Account

Account

An Account represents an Ohloh member. Some Account data is private, and cannot be accessed through the Ohloh API.

Properties
id
The unique ID for the Account.
name
The public name for this Account.
created_at
The time at which this Account was originally created on Ohloh.
updated_at
The time at which this Account record was last modified.
homepage_url
An optional URL to a member’s home page, such as a blog.
avatar_url
A URL to the profile image displayed on Ohloh pages. Currently, this is an URL to the Gravatar free image hosting service, which will resolves to a default image if the account holder is not a Gravatar member. Images are 80×80 by default.
email_sha1
The SHA1 hex digest of the account email address.
posts_count
The number of posts made to the Ohloh forums by this account.
location
An optional text description of this account holder’s claimed location. This text has been validated by either the Google or Yahoo geocoder web service, but the precision is variable.
country_code
A string representing the account holder’s country. This field is derived from location using either the Google or Yahoo geocoder web service. If you use this data, read the important note below.
latitude
longitude
Floating-point values representing the account’s latitude and longitude, suitable for use with the Google Maps API. They are available only when the account has specified a valid location.
kudo_score
If this account has a KudoScore, it will appear here. New accounts may not have a KudoScore. The Ohloh web site displays these accounts with a default KudoRank of 1.
url
The xml api url for this account.
html_url
The url to this accounts details page on Ohloh.
languages
Only available when requesting an accounts details, this node will not be returned as part of a search result list. This node contains the total language experience for this account grouped by language.Eachnode contains the following children:

@color
This is the Ohloh color code for this language. If you will be displaying this data in your application it is highly recommended you use the colors returned here as these are the same colors Ohloh uses to display specific languages.
name
The Ohloh code name for this language, e.g. C# will be csharp and C++ will be cpp.
experience_months
The total number of months that Ohloh has computed as experience in this language for the current Account.
median_monthly_commits
The median number of commits made (when averaged over the total months of experience) by the current Account that contained code in the current Language.
median_monthly_lines_changed
The median number of lines changed (when averaged over the total months of experience) by the current Account that contained code in the current Language.
total_commits
The total number of commits made by the current Account that contained code in the current Language.
total_lines_changed
The total number of lines changed by the current Account that contained code in the current Language.
comment_ratio
The ratio of comment lines to code lines in commits made by the current Account for the current Language.
<languages>
    <language color="A4007E">
        <name>javascript</name>
        <experience_months>24</experience_months>
        <median_monthly_commits>3</median_monthly_commits>
        <median_monthly_lines_changed>856</median_monthly_lines_changed>
        <total_commits>116</total_commits>
        <total_lines_changed>563,931</total_lines_changed>
        <comment_ratio>23.4%</comment_ratio>
    </language>
    <language color="FF1A00">
        <name>css</name>
        <experience_months>20</experience_months>
        <median_monthly_commits>2</median_monthly_commits>
        <median_monthly_lines_changed>488</median_monthly_lines_changed>
        <total_commits>83</total_commits>
        <total_lines_changed>74,705</total_lines_changed>
        <comment_ratio>4.3%</comment_ratio>
    </language>
    <language color="47A400">
        <name>html</name>
        <experience_months>19</experience_months>
        <median_monthly_commits>2</median_monthly_commits>
        <median_monthly_lines_changed>237</median_monthly_lines_changed>
        <total_commits>62</total_commits>
        <total_lines_changed>27,875</total_lines_changed>
        <comment_ratio>20.5%</comment_ratio>
    </language>
</languages>
URL

To get a single Account:

GET http://www.ohloh.net/accounts/{account_id}.xml 

You can also retrieve an Account using the MD5 hash of the email address, if you know it:

GET http://www.ohloh.net/accounts/{email_md5_hash}.xml 

Read more about email-based queries here.

Collection URL

To get a list of all Accounts:

GET http://www.ohloh.net/accounts.xml 

The account collection method supports the standard collection request parameters with the following details:

query
If supplied, only accounts matching the query string will be returned. Only the name field is searched.
sort
Account collections support the following sort options:
created_at (default)
Recently created, first
name
updated_at
Recently updated, first
A Note About Country Codes

Ohloh preferentially uses the Google Maps API geocoder to resolve location names entered by users. country_code values obtained from the Google Maps API use two-letter abbreviations.

However, Google’s coverage is not complete, and not all countries can be resolved. For countries that cannot be resolved by the Google geocoder, Ohloh falls back to the Yahoo geocoder. These countries include the United Kingdom and China. country_code values obtained from Yahoo are full country names, not two-letter abbreviations.

For this reason, there are two data formats intermingled in country_code. Ohloh does not use this data internally, so the data has not been cleaned and unified. Caveat emptor.