A RESTful api built (quickly) to add to tasks for new devs onboarding ViVA XD
URL - https://viva-api-test.herokuapp.com/api
Authentication - Bearer
All endpoints are using the GET
HTTP verb
PS: All the results from the api endpoints are all mock data
/user/daily_active
- get all daily active users
/user/weekly_active
- get all weekly active users
/user/all
- get all users
/agent/activations
- get agent activated users
/agent/daily_sales
- get daily sales by agent
/agent/downloads
- get downloads by agent
/hotspot/downloads
- get hotspot downloads
/revenue/daily_sales
- get revenue (daily)
/revenue/weekly_sales
- get revenue (weekly)
/tops/pub_top_3
- get Top three (3) publishers
/tops/movies_top_3
- get Top three (3) movies of the week
-
Success Response:
- Code: 200
Content:{ data: { _data, status: 200, success: true } }
- Code: 200
-
Error Response:
- Code: 500
Content:{ data: { error: "error message", status: 500, success: false } }
OR
- Code: 401 UNAUTHORIZED
- Code: 500
-
Sample Call:
$.ajax({ url: "/user/daily_sales", dataType: "json", type : "GET", headers: { "Authorization": "Bearer 61Lba2210plafrica" }, success : function(r) { console.log(r); } });