Home > .NET, ADC Services, Open Source, RESTful, Services, WCF, XML > Introducing my Open Source Projects Service: Grab Your Project Details From GitHub or Google Code

Introducing my Open Source Projects Service: Grab Your Project Details From GitHub or Google Code

February 11th, 2010

Say hello to the newest member of my service family; the Open Source Project Service. This service lets me (and you too my friends) grab our project details from either Google Code, or GitHub.

How it works

If you have a project on GitHub or Google Code, you can retrieve your project details.

Single project host retrieval URI:

http://adam.kahtava.com/services/open-source/projects/{project-host}.{xml|json}?user={username}

Multiple project host retrieval URI:

http://adam.kahtava.com/services/open-source/projects.{xml|json}?project-host:username={project-host1:username1,project-host2:username2}

Example, requesting projects from Google Code in XML format:

Request: http://adam.kahtava.com/services/open-source/projects/googlecode.xml?user=adam.kahtava.com

Response:

XML:
  1. <Projects xmlns="http://adam.kahtava.com/services/open-source" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  2.   <Project>
  3.     <Description>The site source in use on Adam.Kahtava.com / AdamDotCom.com (http://adam.kahtava.com/)</Description>
  4.     <LastMessage>More code coverage on controllers required!! :)</LastMessage>
  5.     <LastModified>2010-02-26</LastModified>
  6.     <Name>website</Name>
  7.     <Url>http://code.google.com/p/adamdotcom-website</Url>
  8.   </Project>
  9.   ...
  10. </Projects>

Example, requesting projects from GitHub in JSON format:

Request: http://adam.kahtava.com/services/open-source/projects/github.json?user=adamdotcom

Response:

JAVASCRIPT:
  1. [
  2.   {
  3.     "Description":"A collection of my etcetera, so forth, and so on. Contains a PowerShell script for Twitter, a programming exercise in Ruby, a programming exercise for Google done in JavaScript.",
  4.     "LastMessage":"Bing-bing, changing filenames",
  5.     "LastModified":"2009-06-08",
  6.     "Name":"scripts",
  7.     "Url":"http:\/\/github.com\/AdamDotCom\/scripts"
  8.   },
  9.   ...
  10. ]

Example, requesting projects from both GitHub and Google Code in a single request in XML form:

Request: http://adam.kahtava.com/services/open-source/projects.xml?project-host:username=github:adamdotcom,googlecode:adam.kahtava.com

Response:

XML:
  1. <Projects xmlns="http://adam.kahtava.com/services/open-source" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  2.   <Project>
  3.     <Description>Displays your public source code repositories from Google Code and GitHub.</Description>
  4.     <LastMessage>Added http://code.google.com/p/adamdotcom-services/ link</LastMessage>
  5.     <LastModified>2010-02-23</LastModified>
  6.     <Name>project badge</Name>
  7.     <Url>http://github.com/AdamDotCom/project-badge</Url>
  8.   </Project>
  9.   ...
  10.   <Project>
  11.     <Description>The site source in use on Adam.Kahtava.com / AdamDotCom.com (http://adam.kahtava.com/)</Description>
  12.     <LastMessage>More code coverage on controllers required!! :)</LastMessage>
  13.     <LastModified>2010-02-26</LastModified>
  14.     <Name>website</Name>
  15.     <Url>http://code.google.com/p/adamdotcom-website</Url>
  16.   </Project>
  17.   ...
  18. </Projects>

And Now What?

View my sidebar widget that uses this service to display the latest updates from my source code repositories here.

Contribute, view, or download this openly available source code here.

Author: Adam Kahtava Categories: .NET, ADC Services, Open Source, RESTful, Services, WCF, XML Tags:
  1. No comments yet.
  1. No trackbacks yet.