Skip to content

Instantly share code, notes, and snippets.

@codehakase
Last active January 10, 2018 17:41
Show Gist options
  • Save codehakase/72785bc1c6ac08aee6e86ec4a228fb50 to your computer and use it in GitHub Desktop.
Save codehakase/72785bc1c6ac08aee6e86ec4a228fb50 to your computer and use it in GitHub Desktop.
ViVA mock api info

vivaxd-onboarding-api

A RESTful api built (quickly) to add to tasks for new devs onboarding ViVA XD

Info

URL - https://viva-api-test.herokuapp.com/api

Authentication - Bearer

Endpoints

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 } }
  • Error Response:

    • Code: 500
      Content: { data: { error: "error message", status: 500, success: false } }

    OR

    • Code: 401 UNAUTHORIZED
  • Sample Call:

      $.ajax({
        url: "/user/daily_sales",
        dataType: "json",
        type : "GET",
        headers: {
          "Authorization": "Bearer 61Lba2210plafrica"
        },
        success : function(r) {
          console.log(r);
        }
      });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment