Skip to content

Instantly share code, notes, and snippets.

@tempire
Last active August 29, 2015 14:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tempire/33cee1132408f6db341a to your computer and use it in GitHub Desktop.
Save tempire/33cee1132408f6db341a to your computer and use it in GitHub Desktop.

URL

https://api.westcoa.st/v2

Auth

Authentication is handled by http headers.

  • X-Points-Key
  • X-Points-Secret

Example with CURL

curl \
  -H "X-Points-Key: MPwBQ7Cd5BG31fRmibQxAg" \
  -H "X-Points-Secret: 5812B9CA-9DB0-11E4-BC77-312D65202986" \
  https://api.westcoa.st/v2/members

Endpoints

/v2/members

  • Search fields: name, lname, rank_max, rank_min, limit (defaults to 10), sort_by
  • name and lname accept regular expressions.
  • rank_min and rank_max accept an exact division string (intermediate, novice, etc)
  • Limit accepts a number. Defaults to 10 if not otherwise specified.
  • Sort by accepts field and an optional asc or desc argument
    • sort_by=id
    • sort_by=id:asc
    • sort_by=id:desc

Examples

  • /v2/members?name=Kevin
[
  { id: 29, name: "Kevin Andresin", rank_max: "advanced" },
  { id: 188, name: "Kevin Cruz", rank_max: "champions" },
  ...
]
  • /v2/members?rank_max=intermediate&limit=100
  • /v2/members?name=^Glen&sort_by=id:desc # regular expression, with sort by id descending

/v2/members/:id

/v2/members/:id/results

Examples

  • /v2/members/10915/results

/v2/events

All events ever

  • Search fields: name, location, year, wsdc
  • name and location accept regular expressions.
  • year accepts a 4 digit year (2014)
  • wsdc accepts a 1 or 0, indicating whether it's a wsdc event with points

Examples

  • /v2/events?name=Spotlight
[
  {
    location: "Dearborn, MI",
    name: "Spotlight Dance Celebration",
    stop: "2016-01-04T07:00:00Z",
    start: "2015-12-13T05:00:00Z",
    id: 1278,
    wsdc: true
  },
  {
    stop: "2005-02-01T13:00:00Z",
    location: "Portland, OR",
    name: "Xanadu - Midwinter Dance Celebration",
    wsdc: true,
    start: "2005-01-28T21:00:00Z",
    id: 1131
  }
]
  • /v2/events?location=Raleigh
  • /v2/events?location=(CA|NC)$
    • All events in either California or North Carolina
  • /v2/events?year=2014&wsdc=1
    • All WSDC registered events in 2014

/v2/events/:id

One event

/v2/events/:id/results

All results/placements/finals for one event

/v2/events/upcoming

Events in the future

[{
  facebook_event_id: "757191874333181",
  venue_lng: "-77.423384",
  venue_name: "Hyatt Dulles",
  transaction_time: "2015-01-16T22:20:55Z",
  location: "Washington DC",
  venue_address: "2300 Dulles Corner Blvd, Herndon, Virginia 20171",
  name: "DC Swing eXperience (DCSX)",
  venue_phone: "(703) 713-1234",
  wsdc: true,
  id: 1298,
  start: "2015-11-10T07:00:00Z",
  f_date: "November 10 - 13, 2015",
  venue_lat: "38.960662",
  stop: "2015-11-13T07:00:00Z"
}, ... ]

/v2/events/current

Events happening right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment