<commit_before>The official ruby library for interacting with the "RESTful API":http://mite.yo.lk/en/api of "mite":http://mite.yo.lk/en, a sleek time tracking webapp.

h3. Install
   
   sudo gem install yolk-mite-rb

mite-rb requires activeresource and activesupport gems to be installed.

h3. Documentation

The first thing you need to set is the account name.  This is the same as the web address (subdomain) for your account. For example if you use mite from the domain demo.mite.yo.lk:

  Mite.account = 'demo'

Then, you should set the authentication. You can either use your login credentials (email and password) with HTTP Basic Authentication or your mite.api key. In both cases you must enable the mite.api in your user settings.

With basic authentication:

  Mite.authenticate('<EMAIL>', 'spacemonkey')

or, use your api key:

  Mite.key = '<KEY>'

You should read the complete mite.api documentation at http://mite.yo.lk/en/api

h4. Project

Find projects

   Mite::Project.all          # find all active projects of the current account.
   Mite::Project.find(1209)   # find single project by ID
 
Creating a Project

   project = Mite::Project.new(:name => 'Playing with the mite.api')
   project.save

or:
 
   project = Mite::Project.create(:name => 'Playing with the mite.api') 
 
Updating a Project

   project = Mite::Project.find(1209)
   project.name = "mite.api"
   project.customer = Mite::Customer.find(384)
   project.save
 
Get the customer of an project

   project = Mite::Project.find(1209)
   project.customer
 
Deleting a project

   project = Mite::Project.find(1209)
   project.destroy
 
Restore a destroyed project
(will only work for aprox. 12 hours after the object was destroyed)

    project = Mite::Project.undo_destroy(1209)


<commit_msg>Documentation fixed format-issues and content<commit_after>The official ruby library for interacting with the "RESTful API":http://mite.yo.lk/en/api of "mite":http://mite.yo.lk/en, a sleek time tracking webapp.

h3. Install
   
   sudo gem install yolk-mite-rb

mite-rb requires activeresource and activesupport gems to be installed.

h3. Documentation

The first thing you need to set is the account name.  This is the same as the web address (subdomain) for your account. For example if you use mite from the domain demo.mite.yo.lk:

   Mite.account = 'demo'

Then, you should set the authentication. You can either use your login credentials (email and password) with HTTP Basic Authentication or your mite.api key. In both cases you must enable the mite.api in your user settings.

With basic authentication:

   Mite.authenticate('<EMAIL>', 'spacemonkey')

or, use your api key:

   Mite.key = '<KEY>'

You should read the complete mite.api documentation at http://mite.yo.lk/en/api

h4. Project

Find all active projects of the current account

   Mite::Project.all
   
Find single project by ID

   Mite::Project.find(1209)
 
Creating a Project

   project = Mite::Project.new(:name => 'Playing with the mite.api')
   project.save

or
 
   project = Mite::Project.create(:name => 'Playing with the mite.api') 
 
Updating a Project

   project = Mite::Project.find(1209)
   project.name = "mite.api"
   project.customer = Mite::Customer.find(384)
   project.save
 
Get the customer of an project

   project = Mite::Project.find(1209)
   project.customer
 
Deleting a project

   project = Mite::Project.find(1209)
   project.destroy
 
Restore a destroyed project
(will only work for aprox. 12 hours after the object was destroyed)

   project = Mite::Project.undo_destroy(1209)



{'fraction_non_alphanumeric': 0.08721256309590578, 'fraction_numerical': 0.015703869882220976, 'mean_word_length': 3.699604743083004, 'pattern_counts': {'":': 4, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4282608', 'n_tokens_mistral': 1164, 'n_tokens_neox': 1069, 'n_words': 412}