user9905066
user9905066

Reputation:

How do you build a Ruby on Rails API project WITHOUT an API key?

I have some experience building ROR projects with APIs for Google Maps, Weather Underground, etc. All of these sites had a login section with an API key. I now have a project to complete that requires an API for Github Jobs API. I have looked and looked and there is no API key provided on that page or on the regular Github API page. I have searched online at length and watched about 3 tutorials, yet I am at a loss about how to accomplish this without an API key. I would really appreciate some guidance. Thanks so much!!

Upvotes: 0

Views: 101

Answers (1)

Otavio Henrique
Otavio Henrique

Reputation: 100

Github Jobs API it's open and doesn't need API key to use, you only need to make GET requests as described here

URL: https://jobs.github.com

REQUEST: GET /positions.json

You can send a lot of parameters as query params:

  • description — A search term, such as "ruby" or "java". This parameter is aliased to search.
  • location — A city name, zip code, or other location search term.
  • lat — A specific latitude. If used, you must also send long and must not send location.
  • long — A specific longitude. If used, you must also send lat and must not send location.
  • full_time — If you want to limit results to full time positions set this parameter to 'true'.

Some examples of requests:

https://jobs.github.com/positions.json?description=python&location=sf&full_time=true

https://jobs.github.com/positions.json?search=ruby

https://jobs.github.com/positions.json?lat=37.3229978&long=-122.0321823

https://jobs.github.com/positions.json?location=sp&full_time=true

For use pagination just add page= at the final of query params:

https://jobs.github.com/positions.json?description=ruby&page=1

You can check all the documentation of API here

Upvotes: 1

Related Questions