Last active
November 29, 2018 07:22
-
-
Save thejeshgn/f817ff92f87736fe3dfb8f3df496f8f8 to your computer and use it in GitHub Desktop.
View and Play with it here - https://apps.thejeshgn.com/swagger-ui/?url=https://gist.githubusercontent.com/thejeshgn/f817ff92f87736fe3dfb8f3df496f8f8/raw/a185c70faa7d07dfb9e47422c93ce240a3ad2760/likes-api.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: '2.0' | |
info: | |
title: Likes API | |
description: Simple Likes API written by [Dave Winer](https://github.com/scripting/likes) for registering likes. I created this documentation for the API for my own use. You can use it too. [Thejesh GN](https://thejeshgn.com) | |
version: "0.4.10" | |
# the domain of the dave's service. You can change it to yours | |
host: likes.scripting.com | |
# array of all schemes that your API supports. | |
schemes: | |
- http | |
produces: | |
- application/json | |
paths: | |
/toggle: | |
get: | |
summary: Toggle - like or unlike | |
description: | | |
This will toggle the logged in use's like for a specific url. | |
parameters: | |
- name: oauth_token | |
in: query | |
description: oauth_token | |
required: true | |
type: string | |
- name: oauth_token_secret | |
in: query | |
description: oauth_token_secret | |
required: true | |
type: string | |
- name: url | |
in: query | |
description: URL which you want to like or unlike | |
required: true | |
type: string | |
responses: | |
200: | |
description: An array of usernames who have liked | |
schema: | |
type: array | |
items: | |
type: string | |
/likes: | |
get: | |
summary: Get likes for a given URL | |
description: | | |
Given a url it will get the urls. It doesn't need credentials. | |
parameters: | |
- name: url | |
in: query | |
description: URL which you want to get the details likes | |
required: true | |
type: string | |
responses: | |
200: | |
description: An array of usernames who have liked, ordered by when they liked. | |
schema: | |
type: array | |
items: | |
type: string | |
/mylikes: | |
get: | |
summary: Get the list of likes by the present user | |
description: | | |
This will get you the list of liked urls by the presently logged in user | |
parameters: | |
- name: oauth_token | |
in: query | |
description: oauth_token | |
required: true | |
type: string | |
- name: oauth_token_secret | |
in: query | |
description: oauth_token_secret | |
required: true | |
type: string | |
responses: | |
200: | |
description: An array of urls the urer has liked | |
schema: | |
type: array | |
items: | |
type: string | |
/toplikes: | |
get: | |
summary: Get the list of top likes | |
description: | | |
This will get you top ten likes on the platfom | |
responses: | |
200: | |
description: An array of urls the urer has liked | |
schema: | |
type: array | |
items: | |
type: object | |
properties: | |
url: | |
type: string | |
description: Liked url | |
ctLikes: | |
type: number | |
description: Number of people liked this url | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment