Skip to content

Instantly share code, notes, and snippets.

@haydenjameslee
Last active August 29, 2015 14:24
Show Gist options
  • Save haydenjameslee/018e1c83e43c0b982a32 to your computer and use it in GitHub Desktop.
Save haydenjameslee/018e1c83e43c0b982a32 to your computer and use it in GitHub Desktop.
ConVRge Public API - Online Users and Upcoming Events

ConVRge Public API

Online Users

Endpoint: http://convrge.co/api/users

Returns a JSON object with the following format:

{
    playersOnline: {
        id: playerName,
        id2: playerName2
    },
    playersWatching: numPlayersWatchingOnlinePage (http://convrge.co/online)
}

// Note that the id's listed in this object change each time a player logs in, and sometimes even while they are in game.
// Currently there is no unique identifier per user exposed by the api.

eg.

{
    playersOnline: {
        2489: hayden,
        2399: Shawn
    },
    playersWatching: 5
}

Here is the JS we show on http://convrge.co/online for reference: http://www.convrge.co/js/online.js

Upcoming Events

Endpoint: http://convrge.co/api/events

Returns a JSON list with like the following example:

[
    {
        id: "11",
        title: "ConVRge Weekly Campfire Meetup",
        description: "Weekly meetup in ConVRge. All invited!",
        url: "https://addevent.to/?rl71162",
        start: "2015-07-09 21:00:00",
        end: "2015-07-09 23:00:00",
        created_at: "2015-07-06 12:09:05",
        updated_at: "2015-07-06 12:09:05"
    },
    {
        eventTwo...
    },
    {
        eventThree...
    }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment