Practice App Documentation - bounswe/bounswe2019group6 GitHub Wiki
Practice app consists of five different APIs which will be helpful for our main project. There exists a backend application and a frontend application.
Events API
Get the details of economic events perfoming today.
URL : /events
Method : GET
Auth required : NO
Permissions required : None
Parameters : None
Code : 200 OK
The return type is a list of dictionaries of which elements contain event information.
Content examples
[{
"name": "General Elections",
"country": "Panama",
"date": "2019-05-05",
"rep": 2,
"actual": "",
"prev": "",
"forecast": ""
},
{
"name": "Emirates NBD PMI",
"country": "Egypt",
"date": "2019-05-05",
"rep": 1,
"actual": "50.8",
"prev": "49.9",
"forecast": "50.1"
}]
- "rep" key resresents the importance of an economic event ranging from 1 to 3.
- "actual", "prev" and "forecast" keys might have empty values for some events.
Currency Rate API
After obtaining request from user, it respond the requested currency translation or all currency translations.
URL : /currencyrate/<str:source>to<str:target>
Method : POST
Auth required : NO
Permissions required : None
Parameters : source, target
Code : 200 OK
Content examples
{
"response": success,
"datetime": "2019-05-06 11:49:05",
"Source to Target: "6.708424",
}
No note here!
News API
Having information about the newly emerged financial news
URL : /news
Method : GET
Auth required : NO
Permissions required : None
Parameters : None
Code : 200 OK
Content examples
List of dictionaries is returned, each are itemized by their id's. Information about the news are categorized accordingly.
{"77111":
{"id": "77111",
"title": "Rwanda Inflation Rate Lowest in 3 Months in April",
"description": "The annual inflation rate in Rwanda eased to 0.2 percent in April 2019 from 1.1 percent in the prior month. It is
the lowest inflation since January, as prices fell further for food & non-alcoholic beverages (-3.1% vs 2.4% in
March) and slowed for transport (3% vs 6.7%). Also, cost was flat for housing & utilities (vs 1.1% in March). On a
monthly basis, consumer prices went up 0.3 percent, following a 1.1 percent rise in the previous month.",
"date": "2019-05-10",
"country": "Rwanda",
"symbol": "RwandaIR",
"url": "/rwanda/inflation-cpi"},
"77107":
{"id": "77107",
"title": "Kosovo Inflation Rate Highest in Over 6 Years",
"description": "Annual inflation rate in Kosovo edged up to 3.4 percent in April of 2019 from 3.3 percent in the previous month. It was
the highest inflation rate since January of 2013, as cost rose faster for food & non-alcoholic beverages (7.1 percent
from 6.7 percent in March) and for furniture & household equipment (0.9 percent vs 0.3 percent). On the other hand,
prices went up at a softer pace for transport (2.2 percent vs 2.7 percent); alcoholic beverages & tobacco (2.7 percent
vs 2.8 percent) and miscellaneous goods & services (1.0 percent vs 1.3 percent) while cost fell for housing & utilities
(-1.4 percent vs -1.3 percent); recreation & culture (-0.3 percent vs -0.4 percent) and communication (-0.3 percent vs
-0.5 percent). On a monthly basis, consumer prices went up 0.1 percent, the same as in March.",
"date": "2019-05-10",
"country": "Kosovo",
"symbol": "KOSSOVOINFNRATE",
"url": "/kosovo/inflation-cpi"}
}
- There is no note for the api
Twitter API
- Returns some links that leads to events and news
URL : /twitter
Method : GET
Auth required : NO
Permissions required : None
Parameters : None
Code : 200 OK
Content examples
{
"all_links": [
"https://go.shr.lc/2L9MKtJ",
"https://www.publish0x.com/earning-crypto/what-are-security-tokens-and-stos-xllynk?a=mWZdPqweKg",
"https://go.shr.lc/2VeKaGv",
"http://bit.ly/2U1f8gz",
"https://www.publish0x.com/consensus-report/along-with-bitcos-prices-lightg-network-numbers-explod-xepzw?a=mWZdPqweKg"
]
}
- NO NOTE HERE
Google API
Suggest autocomplete places for given input keyword
URL : /google/map/place
Method : GET
Auth required : NO
Permissions required : None
Parameters : input
Place predictions about given input
Code : 200 OK
Content examples
{
"predictions" : [
{
"description" : "Ankara, Turkey",
"id" : "908fdf0efc46fb81721d9b06ff54ee23e8703a4f",
"matched_substrings" : [
{
"length" : 6,
"offset" : 0
}
],
"place_id" : "ChIJsS1zINVH0xQRjSuEwLBX3As",
"reference" : "ChIJsS1zINVH0xQRjSuEwLBX3As",
"structured_formatting" : {
"main_text" : "Ankara",
"main_text_matched_substrings" : [
{
"length" : 6,
"offset" : 0
}
],
"secondary_text" : "Turkey"
},
"terms" : [
{
"offset" : 0,
"value" : "Ankara"
},
{
"offset" : 8,
"value" : "Turkey"
}
],
"types" : [ "locality", "political", "geocode" ]
}
],
"status" : "OK"
}
NO NOTE HERE
Returns Google Geocode Object from given place_id
URL : /google/map/geocode
Method : GET
Auth required : NO
Permissions required : None
Parameters : input
Geocode Object
Code : 200 OK
Content examples
{
"results" : [
{
"address_components" : [
{
"long_name" : "Ankara",
"short_name" : "Ankara",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Ankara",
"short_name" : "Ankara",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Turkey",
"short_name" : "TR",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Ankara, Turkey",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 40.076332,
"lng" : 33.007056
},
"southwest" : {
"lat" : 39.7304211,
"lng" : 32.5184735
}
},
"location" : {
"lat" : 39.9333635,
"lng" : 32.8597419
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 40.076332,
"lng" : 33.007056
},
"southwest" : {
"lat" : 39.7304211,
"lng" : 32.5184735
}
}
},
"place_id" : "ChIJsS1zINVH0xQRjSuEwLBX3As",
"types" : [ "locality", "political" ]
}
],
"status" : "OK"
}
NO NOTE HERE