Project Final Proposal
Project Objective
The objective of this project is to generate an interaction google map which will display the location of search song either by song name or song hashtag from Twitter. This application willfilter the Twitter stream for #NowPlaying or similar hashtag based on user input or song name and identify the nearby location of that song and create a playlist on Spotify.
Proposed User Interaction
1. User Twitter Search
It is the first interaction where the user will search for a song name or a singer name using hashtag which will display the list of different tweets based on the #(song/singer) name and show the location on Google Map with a marker for each tweet based on from its location. During this interaction Twitter API and Google Map API will be utilized for this action.
2. User Creating Spotify Playlist
This is the second phase where user will interact on the web page. After, searching for song/singer name, Spotify will create a playlist for the user and user will be asked to either authorize the Spotify to create or sign-in/register to create a playlist
Technologies
- Bootstrap
- jQuery
- PHP
- JavaScript
- jQuery pluginsAPI's
Twitter
Parameter
Name
|
Required
|
Description
|
Default Value
|
Example
|
q
|
Required
|
A UTF-8, URL-encoded search query of 500 characters maximum, including operators. Queries may additionally be limited by complexity.
|
|
@noradio
|
Result_type
|
Optional
|
Optional. Specifies what type of search results you would prefer to receive. The current default is "mixed." Valid values include:
mixed : Include both popular and real time results in the response.
recent : return only the most recent results in the response
popular : return only the most popular results in the response
|
|
Mixed recent popular
|
Count
|
optional
|
The number of tweets to return per page, up to a maximum of 100. Defaults to 15. This was formerly the "rpp" parameter in the old Search API.
|
|
100
|
geocode
|
optional
|
Returns tweets by users located within a given radius of the given latitude/longitude. The location is preferentially taking from the Geotagging API, but will fall back to their Twitter profile. The parameter value is specified by "latitude,longitude,radius ", where radius units must be specified as either " mi " (miles) or " km " (kilometers). Note that you cannot use the near operator via the API to geocode arbitrary locations; however you can use this geocode parameter to search near geocodes directly. A maximum of 1,000 distinct "sub-regions" will be considered when using the radius modifier.
|
|
37.781157 -122.398720 1mi
|
Lang
|
Optional
|
Restricts tweets to the given language, given by an ISO 639-1 code. Language detection is best-effort.
|
|
eu
|
until
|
optional
|
Returns tweets created before the given date. Date should be formatted as YYYY-MM-DD. Keep in mind that the search index has a 7-day limit. In other words, no tweets will be found for a date older than one week.
|
|
2015-07-19
|
since_id
|
optional
|
Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available.
|
|
12345
|
max_id
|
optional
|
Returns results with an ID less than (that is, older than) or equal to the specified ID.
|
|
54321
|
These parameters will help to return a search based on the user input such as #NowPlaying, #BebeRexha, #Drake, #Eminem and where these tweets are coming from such as London, United States, Portugal, etc.
Spotify
Path Parameter
|
Value
|
user_id
|
The user's Spotify user ID.
|
Authorization
|
Required. A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The access token must have been issued on behalf of the user.
Creating a public playlist for a user requires authorization of the playlist-modify-publicscope; creating a private playlist requires the playlist-modify-private scope. See Using Scopes.
|
Content-Type
|
Required. The content type of the request body: application/json
|
Name (String)
|
Required. The name for the new playlist, for example "Your Coolest Playlist". This name does not need to be unique; a user may have several playlists with the same name.
|
Public(Boolean)
|
Optional, default true. If true the playlist will be public, if false it will be private. To be able to create private playlists, the user must have granted the playlist-modify-private scope.
|
Collaborative(Boolean)
|
Optional, default false. If true the playlist will be collaborative. Note that to create a collaborative playlist you must also set public to false. To create collaborative playlists you must have granted playlist-modify-private and playlist-modify-public scopes.
|
Parameter
The expected result from these parameters will be to create a song playlist either based on the search song or search artist on Twitter.
Google Maps
Endpoint URL:https://www.googleapis.com/geolocation/v1/geolocate?key=AIzaSyA88e2Wst824dxiHvigUsFeXL_hUeq-ZmM
Parameter
- homeMobileCountryCode: The mobile country code (MCC) for the device's home network.
- homeMobileNetworkCode: The mobile network code (MNC) for the device's home network.
- radioType: The mobile radio type. Supported values are lte, gsm, cdma, and wcdma. While this field is optional, it should be included if a value is available, for more accurate results.
- carrier: The carrier name.
- considerIp: Specifies whether to fall back to IP geolocation if wifi and cell tower signals are not available. Note that the IP address in the request header may not be the IP of the device. Defaults to true. Set considerIp to false to disable fall back.
- cellTowers: An array of cell tower objects. See the Cell Tower Objects section below.
- wifiAccessPoints: An array of WiFi access point objects. See the WiFi Access Point Objectssection.