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

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!!

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

Related

YT search API to search for Arabic speaking channels locally in Israel

How can I retrieve all Arabic speaking channels locally in Israel.
Using the API explorer, I don't see such an option.
Which fields are mandatory for search to call the search API?
Is there any way to fulfill this task?
Update:
API Explorer
I couldn't get results
There are lots of parameters in the API v3 Docs for Search that you can play around with, some in particular you might find helpful are:
location
locationRadius
regionCode
relevanceLanguage
and you'll need to set type = "channel" to return only channels.
The only mandatory parameter is part which is what data you want returned from your results. For this search call, you only have one option for part, which is "snippet".
This is the only way to do it simply within your multiple parameters, and it will take 100 quota per search, assuming you have an API key already.
If you press 'Try This API' on the right, it'll even give you code snippets you can copy in a variety of languages, since you didn't specify one in the prompt.
Depending on the language, a call could look like the following:
GET https://youtube.googleapis.com/youtube/v3/search?part=snippet&location=Israel&regionCode=IL&relevanceLanguage=ar&type=channel&key=[YOUR_API_KEY] HTTP/1.1

Youtube API beginner, searching for a list of different terms automatically

I have no idea if I'm allowed to ask questions here, because I'm a complete beginner and I need help for a university paper I want to write. I need to search for quite a big list of terms in the YouTube API with a specific regioncode, location, locationradius, publishedafter and publishedbefore term.
So basically I need to do queries like these, but for the same search term I have to change these parameters a few times and I have to do that for a lot of search terms.
Does anyone have a good guide that shows how to do this? Or would someone be willing to help me with this?
Thanks in advance
You can find YouTube API search examples in every major language in this Github repository. The reference for this API endpoint as well as the list of parameters available for the search.list call is available here.
You'll need an API key to use the API which you can get by:
Going to the API Console (create an developer account and API project if you haven't already).
Enabling the YouTube API on your API project on this page.
Clicking Add credentials > API key and selecting "sever key"

Youtube API v3 Return Lat/Lng

I can search lat/long with YouTube v3 successfully,
https://www.googleapis.com/youtube/v3/search?part=snippet,id&maxResults=50&type=video& videoType=any&key=foobar&location=40.7127,74.0059&locationRadius=100km
However, the response doesnt give me the individual videos lat/lng in the results.
The API doc says:
The part parameter specifies a comma-separated list of one or more
search resource properties that the API response will include. Set the
parameter value to snippet.
I cannot find any other search resource properties besides id and snippet in Search:list.
(Why would the API include that first sentence if there are only 2 options?) I digress.
Question-
Is there any way that I can retrieve YT videos lat/long based on lat/long search?
You can have lat/long parameters of the videos you own or manage. But due to privacy reasons (been able to locate people from their uploads.) you won't be able to get specific geolocations of other people's uploads.

Java Library or API for extracting tweets of particular interest

I would like to know if there is a java library or API , that can extract tweets of my interest such as i want to know which tweets have reported about the strike in upcoming days in Islamabad city or bomb blast recently occured in my city . etc. I know there are other libraries out there but they only tell about whether the specific tweet is positive , negative or neutral. Thanks
Every library for integrating twitter tweets to your application is based on the twitter apis.
For your specific example, you can try Search API.
The process is really simple: just try from here your keywords to determine which keywords best suit your need and then use the actual API like this(returns tweets with keyword:Islamabad) to return the tweets you need in a JSON format.
NOTE:
Version 1.1 of the APIS uses an OAuth Authentication(I have not tried it yet so I can not provide more details :( ).
Now for Java libraries(frameworks) that simplify this process, the only one I know is Spring Social. But in case you are not familiar with Spring framework in general, the best thing is to just read the Json url generated by the api and unmarshall it to get your results.

Tweets, Location, Keywords and Data

I'm trying do some analysis on locations where people are going during winters. The approach I'm following is get tweets from a specific city (say, New York) and with the keyword Foursquare. Then use foursquare data for that user to see his/her checkins and try to trace a pattern.
So, I'm stuck in the first phase. How do I get those tweets from ONE city and with the keyword FOURSQUARE. I'm not sure if I understood how to use streaming API correctly and the ReST API isn't working (shows NOT AUTHORISED)
Could you tell me a detailed procedure for a rookie to understand the process of doing the above mentioned process. Also, let me know if you have a better approach for analysing trends in check ins.
Thanks
You want to read these:
https://dev.twitter.com/docs/api/1/get/search
https://dev.twitter.com/docs/platform-objects/places
You can give Twitter a latitude/longitude coordinate and a radius, or you can use the "place" field as a filter. Either way, expect to fine-tune this a bit to fit your needs. You also need to take into account that a lot of people might tweet without location services enabled.
If you want to use the REST API, you need to get an API key from twitter.

Resources