Forums : Ohloh API Discussion

Bug Reports?

Hi there,

very nice project :)

But I'm missing the link to submit bug reports for your API

There is a strange problem with the following request:

http://www.ohloh.net/projects/60/contributors.xml?v=1

There are some projects, which reponse with its HTML pages, instead of an XML document. As far as i can see in my logs, following project_id's had send an HTML reply:

60, 499, 520, 347, 550

Additionally it would be very nice to get a direct connection between accounts and projects. Cause I did like to now, how many people are working at new zealand with PHP and Java and which projects, they are working on.

Kind Regards GRon

B207c84229c3cc91fa26369bc374d2eb?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
gron over 9 years ago
 

Hi GRon,

We don't have a public bug list yet. The forum is the best place to get help.

The projects you are having trouble with do not have contributors, because we do not have the source code and have not created reports. Basically, the page you are requesting does not exist, and our code is trying to redirect you to the project home page. I will post a bug against the API to return an error message instead of redirecting.

To work around this problem for now, before you try to download the contributors, you will have to first retrieve the project itself and check its best_analysis_id element. If that element is empty, then the project does not have an analysis. Without an analysis, it will not have any other Ohloh data: no enlistments, no lines of code, and no contributors.

We do plan to publish the connection between accounts and projects in the API (we call these "positions"), but it is not implemented yet. I will bump this up the queue as the next feature to add to the API, but we are really busy lately and I can't promise a delivery time.

Thanks for trying out the API. Let me know if I can offer more help,

Robin

063ffe4b4061aa874f09216cfd60d8f2?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Robin Luckey over 9 years ago
 

Thanks, pscott. I've made the correction.

063ffe4b4061aa874f09216cfd60d8f2?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Robin Luckey over 9 years ago
 

Hi Ohloh team! First of all, great work! Now on to the requests: * I don't know if this is a bug or a feature, but the xml responses lack the header (I mean the <?xml version="1.0" encoding="xxx"?>). I can't feed the responses to yahoo pipes because of that... * A little correction: on http://www.ohloh.net/api/reference/stack it says "you will always receive a single Atack" (instead of Stack...)

Thanks!

Eeb2fbb30532904e05b670840e85219b?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Mauricio Scheffer over 9 years ago
 

Hi mausch,

I am deploying the fix to add the <?xml... > declaration to the top of our API responses now.

My only concern is that we might break some existing apps that worked around our bug, but I've had this to-do list item for a long time and it was a pretty simple fix.

Yahoo Pipes appears to be working for me now -- let me know if there's any more trouble.

Thanks for reporting,

Robin

063ffe4b4061aa874f09216cfd60d8f2?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Robin Luckey over 9 years ago
 

A small typo on the Kudo page: the urls to access the kudos are not

GET http://www.ohloh.net/account/{accountid}/kudos.xml GET http://www.ohloh.net/account/{accountid}/kudos/sent.xml

but

GET http://www.ohloh.net/accounts/{accountid}/kudos.xml GET http://www.ohloh.net/accounts/{accountid}/kudos/sent.xml

A15c336550dd22cbdff9743a54b56b3b?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Yanick over 9 years ago
 

Thanks Robin! works great now

Eeb2fbb30532904e05b670840e85219b?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Mauricio Scheffer over 9 years ago
 

Thanks Yanick -- I've fixed the typo.

063ffe4b4061aa874f09216cfd60d8f2?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Robin Luckey over 9 years ago
 

You're quite welcome. :-)

A15c336550dd22cbdff9743a54b56b3b?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Yanick over 9 years ago
 

Two other small typos in the API:

The primarylanguagenice_name element returned within a contributorfact is *primarlylanguagenicename*.

In the Enlistment API page, languagenicename is given as primarylanguagenice_name.

A15c336550dd22cbdff9743a54b56b3b?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Yanick over 9 years ago
 

Hi Yanick,

I've fixed the "primarly" typo in the XML response.

However, I can't find the typo on the Enlistment API page. Can you help me out with some more specifics? An URL?

Thanks, Robin

063ffe4b4061aa874f09216cfd60d8f2?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Robin Luckey over 9 years ago
 

Do'h! Sorry, I meant contributorLanguageFact (http://www.ohloh.net/api/reference/contributorlanguagefact). The fifth property.

A15c336550dd22cbdff9743a54b56b3b?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Yanick over 9 years ago
 

Thanks! It's fixed now. I have to admit I get confused myself sometimes with all of the ContributorFact, ContributorLanguageFact, etc. (and the many more such related items we have internally). :-)

063ffe4b4061aa874f09216cfd60d8f2?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Robin Luckey over 9 years ago
 

I'm getting a 406 response from certain API requests... for example http://www.ohloh.net/projects/175/commits.xml?v=1&apikey=MYAPI_KEY&page=1 Has something changed?

Eeb2fbb30532904e05b670840e85219b?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Mauricio Scheffer over 9 years ago
 

Commits are not accessible through the API. Did this ever work? I don't recall ever implementing it.

063ffe4b4061aa874f09216cfd60d8f2?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Robin Luckey over 9 years ago
 

Yup, commits were available through the API. In fact, I used that to build a commit chart (now broken)

Eeb2fbb30532904e05b670840e85219b?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Mauricio Scheffer over 9 years ago
 

Wow. It's a long story, but what you were receiving was not actually part of the API. Yes, you were getting an XML response, but it was not a well-formed API response.

It's not entirely clear why this XML commits page even existed, but I think it was related to an Ajax callback for the interactive commits timeline, which we subsequently changed to use JSON, but the old XML interface was still active.

In short, you discovered a forgotten, deprecated XML page on our site that was not actually part of the API.

I'll consider this a request to have commits added to the API. :-)

063ffe4b4061aa874f09216cfd60d8f2?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Robin Luckey over 9 years ago
 

Oh well. I hope the commit XML comes back soon :-) Thanks

Eeb2fbb30532904e05b670840e85219b?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Mauricio Scheffer over 9 years ago
 

Oh, it seems there's a duplicate request for jquery.autocomplete.min.js

Eeb2fbb30532904e05b670840e85219b?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Mauricio Scheffer over 9 years ago
 

A small doc omission: The sizeFact API reference (http://www.ohloh.net/api/reference/size_fact) does not mention its 'commits' property.

A15c336550dd22cbdff9743a54b56b3b?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Yanick about 9 years ago
 

Thanks Yanick -- this is now fixed.

063ffe4b4061aa874f09216cfd60d8f2?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Robin Luckey about 9 years ago
 

Seems like http://www.ohloh.net/languages.xml is now returning the first ten languages instead of the full list. Is the results meant to be paginated, now?

A15c336550dd22cbdff9743a54b56b3b?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Yanick about 9 years ago
 

Yes, sorry Yanick -- the trouble is that the API data is generated by the same code that drives the corresponding web page. When the number of languages started getting really long, we started paginating the web result, without realizing that this also paginates the API result.

So, yes, the languages result is now paginated in the API. I'll update the docs accordingly.

063ffe4b4061aa874f09216cfd60d8f2?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Robin Luckey about 9 years ago
 

There seems to be an oddity / bug in http://www.ohloh.net/projects/1.xml?api_key=...&v=1

There's some escaped HTML in the XML for the logos:

<medium_logo_url> <img alt="Svn_med" src="http://bits.ohloh.net/attachments/1/svn_med.png" /></medium_logo_url>

Which should be:

<medium_logo_url>http://bits.ohloh.net/attachments/1/svn_med.png</medium_logo_url>

cheers stuart

95c3e2132444cf8f545d4ddfe6172503?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Stuart Yeates about 9 years ago
 

I'm also seeing an application error with:

http://www.ohloh.net/projects/simal/contributors/165705.xml&api_key=...&v=1

Confusingly the content-type is application/xml but the contents of the error page are HTML. Maybe the Errror handling pages could reset the content-type?

95c3e2132444cf8f545d4ddfe6172503?&s=42&rating=pg&d=http%3a%2f%2fopenhub.net%2fanon80
Stuart Yeates about 9 years ago
 

Post a Response