{"swagger":"2.0","info":{"version":"1.0.0","title":"ABC Voting","contact":{"email":"luc@angrybytes.com"}},"securityDefinitions":{"AccessToken":{"type":"apiKey","in":"header","name":"AccessToken"}},"security":[{"AccessToken":[]}],"parameters":{"CommonAcceptParameterHeader":{"name":"Accept","type":"string","in":"header","required":true,"description":"Accept header describing the application (my_app), response format (json) and the API version (v1) e.g. \"application/vnd.my_app.api+json;version=v1\""}},"paths":{"/nominees":{"get":{"tags":["Nominees"],"summary":"List nominees","produces":["application/json"],"parameters":[{"$ref":"#/parameters/CommonAcceptParameterHeader"}],"responses":{"200":{"description":"List of nominees in the active voting round.","schema":{"type":"array","items":{"$ref":"#/definitions/Round"}}}}}},"/vote":{"post":{"tags":["Votes"],"summary":"Submit votes","description":"Submit one or more votes for a round.","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"$ref":"#/parameters/CommonAcceptParameterHeader"},{"name":"data","in":"body","description":"Submit one or more votes.","required":true,"schema":{"$ref":"#/definitions/SubmitVotes"}}],"responses":{"200":{"description":"Vote(s) submitted."},"400":{"description":"Invalid input."},"404":{"description":"Round, category or nominee not found."}}}}},"definitions":{"Round":{"type":"object","properties":{"id":{"type":"string","format":"int","example":1,"description":"Round id"},"name":{"type":"string","example":"First round","description":"Round name"},"slug":{"type":"string","example":"first-round","description":"Round slug based on round name"},"nominees":{"$ref":"#/definitions/Nominees"}}},"Category":{"type":"object","properties":{"id":{"type":"string","format":"int","example":1,"description":"Category id"},"name":{"type":"string","example":"Social Innovator Award","description":"Category name"},"image":{"type":"string","format":"url","example":"https://app.abcvoting.com/image/85.jpg","description":"Category image"},"bannerImage":{"type":"string","format":"url","example":"https://app.abcvoting.com/image/85.jpg","description":"Category banner image"}}},"Nominees":{"properties":{"type":{"type":"string","example":"nominee","description":"Nominee type (`nominee` or `suggestion`)"},"id":{"type":"string","format":"int","example":20,"description":"Nominee id"},"name":{"type":"string","example":"AndrewHuang","description":"Nominee name"},"hashtag":{"type":"string","example":"andrew","description":"Twitter hashtag (can be used for counting Twitter votes)"},"secondaryName":{"type":"string","example":"@AndrewHuang"},"hometown":{"type":"string","example":"Toronto, ON"},"knownFor":{"type":"string","example":"Youtube Personality"},"AdditionalInfo":{"type":"string","example":"Andrew Huang is a Canadian musician, video producer, and YouTube personality."},"image":{"type":"string","format":"url","example":"https://app.abcvoting.com/image/85.jpg"},"category":{"$ref":"#/definitions/Category"},"tags":{"type":"array","items":{"$ref":"#/definitions/Tags"},"example":[{"id":1,"name":"TV"},{"id":2,"name":"Musician"}]},"socials":{"type":"array","items":{"$ref":"#/definitions/Socials"},"example":[{"name":"Facebook","url":"https://www.facebook.com/andrewismusic/?fref=ts"},{"name":"YouTube","url":"https://www.youtube.com/user/songstowearpantsto"}]},"snapchat":{"type":"array","items":{"$ref":"#/definitions/Snapchat"},"example":[{"handle":"andrewhuaaaaang","account":"http://snapchat.com/add/andrewhuaaaaang"}]},"order":{"type":"string","format":"int","example":12,"description":"When multiple nominees are returned, this field will be used to indicate the order."}}},"Socials":{"properties":{"name":{"type":"string"},"url":{"type":"string","format":"url"}}},"Tags":{"properties":{"id":{"type":"string"},"name":{"type":"string","format":"url"}}},"Snapchat":{"properties":{"handle":{"type":"string"},"account":{"type":"string","format":"url"}}},"SubmitVotes":{"type":"object","properties":{"roundId":{"type":"integer","example":1,"description":"Round to vote in."},"votes":{"type":"array","items":{"$ref":"#/definitions/SubmitVote"}}}},"SubmitVote":{"properties":{"categoryId":{"type":"integer","example":1,"description":"Category the nominee belongs to."},"nomineeId":{"type":"integer","example":1,"description":"Nominee to vote for."}}}},"schemes":["https"]}