socialnetworknews-api

git clone git://archive.git.mtrnord.blog/SocialNetworkNews/socialnetworknews-api.git
Log | Files | Refs | LICENSE

openapi.yaml (5453B)


      1 openapi: 3.0.0
      2 info:
      3   title: Social Networks News Project API
      4   description: API Definition for the Social Networks News Project
      5   version: 0.0.0
      6   contact:
      7     name: API Support
      8     email: freifunknews@nordgedanken.blog
      9   license:
     10     name: GPL-3.0
     11     url: https://github.com/SocialNetworkNews/SocialNetworkNews_API/raw/master/LICENSE
     12 
     13 servers:
     14   - url: https://socialnetworksnews.nordgedanken.blog/api
     15   - url: https://freifunknews.nordgedanken.blog/api
     16 
     17 tags:
     18   - name: "paper"
     19     description: "Everything that is used for papers"
     20   - name: "user"
     21     description: "Get user Data"
     22 
     23 paths:
     24   /papers:
     25     get:
     26       tags:
     27         - paper
     28       summary: Get a List of all available Papers
     29       responses:
     30         '200':    # status code
     31           description: A JSON array containing a short info about available Papers
     32           headers:
     33             API-VERSION:
     34               schema:
     35                 type: string
     36                 default: 0.0.0
     37               description: Current API Version.
     38           content:
     39             application/json:
     40               schema:
     41                 type: array
     42                 items:
     43                   properties:
     44                     name:
     45                       type: "string"
     46                     uuid:
     47                       type: "string"
     48     post:
     49       tags:
     50         - paper
     51       summary: Add a new Paper
     52       requestBody:
     53         required: true
     54         content:
     55           application/json:
     56             schema:
     57               type: array
     58               items:
     59                 properties:
     60                   name:
     61                     type: string
     62                   paper_image:
     63                     type: string
     64                   description:
     65                     type: string
     66                   author:
     67                     type: object
     68                     properties:
     69                       uuid:
     70                         type: string
     71       responses:
     72         '200':    # status code
     73           description: A JSON array containing a short info about the just added Papers (might be different ordered)
     74           headers:
     75             API-VERSION:
     76               schema:
     77                 type: string
     78                 default: 0.0.0
     79               description: Current API Version.
     80           content:
     81             application/json:
     82               schema:
     83                 type: array
     84                 items:
     85                   properties:
     86                     name:
     87                       type: "string"
     88                     uuid:
     89                       type: "string"
     90   /paper/{uuid}:
     91     get:
     92       tags:
     93         - paper
     94       summary: Get more details about the Paper
     95       parameters:
     96         - name: uuid
     97           in: path
     98           description: UUID of the paper
     99           required: true
    100           schema:
    101             type: integer
    102             format: int64
    103       responses:
    104         '200':    # status code
    105           description: A JSON array containing a short info about available Papers
    106           headers:
    107             API-VERSION:
    108               schema:
    109                 type: string
    110                 default: 0.0.0
    111               description: Current API Version.
    112           content:
    113             application/json:
    114               schema:
    115                 type: object
    116                 properties:
    117                   name:
    118                     type: string
    119                   uuid:
    120                     type: string
    121                   description:
    122                     type: string
    123                   author:
    124                     type: object
    125                     properties:
    126                       uuid:
    127                         type: string
    128                       username:
    129                         type: string
    130                       profile_image_url:
    131                         type: string
    132                       twitter_profile:
    133                         type: string
    134                       google_profile:
    135                         type: string
    136                       github_profile:
    137                         type: string
    138   /paper/{uuid}/yesterday:
    139     get:
    140       tags:
    141         - paper
    142       summary: Get the Data that should get displayed of yesterday
    143       parameters:
    144         - name: uuid
    145           in: path
    146           description: UUID of the paper
    147           required: true
    148           schema:
    149             type: integer
    150             format: int64
    151       responses:
    152         '200':    # status code
    153           description: A JSON array of Posts (currently Tweets)
    154           headers:
    155             API-VERSION:
    156               schema:
    157                 type: string
    158                 default: 0.0.0
    159               description: Current API Version.
    160           content:
    161             application/json:
    162               schema: 
    163                 type: array
    164                 items: 
    165                   properties:
    166                     username:
    167                       type: string
    168                     user_id:
    169                       type: string
    170                     display_name:
    171                       type: string
    172                     userprofile_link:
    173                       type: string
    174                     text:
    175                       type: string
    176                     image_urls:
    177                       type: array
    178                       items:
    179                         type: string
    180                     created_at:
    181                       type: string
    182                     favorites:
    183                       type: string
    184                     retweets:
    185                       type: string
    186                     retweet:
    187                       type: boolean
    188                       default: false