petrosh / snippetrosh

Notes with Issues
MIT License
1 stars 3 forks source link

API #14

Open petrosh opened 9 years ago

petrosh commented 9 years ago
petrosh commented 8 years ago

Spreaker.com

http://api.spreaker.com/user/4545509/episodes

{
    "response": {
        "pager": {
            "current_page": 1,
            "first_page": 1,
            "last_page": 4,
            "results_count": 33,
            "results": [
                {
                    "episode_id": 7783202,
                    "published_at": "2016-02-14 00:37:29",
                    "title": "dj scandals 2",
                    "stats": {
                        "plays": 30
                    }
                }, {
                    "episode_id": 7776181,
                    "title": "dj scandals",
                    "published_at": "2016-02-13 23:46:21",
                    "stats": {
                        "plays": 39
                    }
                }
            ]
        }
    }
}
petrosh commented 8 years ago

Wordpress.com

Shortcodes

REST API Resources

Posts: GET /sites/$site/posts/ URL https://public-api.wordpress.com/rest/v1.1/sites/$site/posts/ No authentication required Demo https://gattiecani.github.io/renderizer/javascript/fetch/

https://public-api.wordpress.com/rest/v1.1/sites/gattiecani.wordpress.com/posts/
{
  "found": 150,
  "posts": [
    {
      "ID": 2904,
      "site_ID": 60730919,
      "author": {
        "ID": 54646473,
        "login": "giampiex",
        "email": false,
        "name": "giampiex",
        "first_name": "",
        "last_name": "",
        "nice_name": "giampiex",
        "URL": "",
        "avatar_URL": "https://1.gravatar.com/avatar/ae65788e7ca049a49dbe1c619842a7db?s=96&d=identicon&r=G",
        "profile_URL": "http://en.gravatar.com/giampiex",
        "site_ID": 60730919
      },
      "date": "2017-01-30T19:48:43+01:00",
      "modified": "2017-01-30T19:48:43+01:00",
      "title": "POLLY!",
      "URL": "https://gattiecani.wordpress.com/2017/01/30/polly/",
      "short_URL": "http://wp.me/s46OSX-polly",
      "content": "",
      "slug": "polly",
      "guid": "https://gattiecani.wordpress.com/?p=2904",
      "status": "publish",
      "sticky": false,
      "password": "",
      "parent": false,
      "type": "post",
      "discussion": {
        "comments_open": false,
        "comment_status": "closed",
        "pings_open": true,
        "ping_status": "open",
        "comment_count": 0
      },
      "likes_enabled": true,
      "sharing_enabled": true,
      "like_count": 1,
      "i_like": false,
      "is_reblogged": false,
      "is_following": false,
      "global_ID": "f7842a39eb3cf0be6918aa9bce2b1e56",
      "featured_image": "https://gattiecani.files.wordpress.com/2017/01/16114254_1156235844490629_3675690371123784421_n1-e1485802092358.jpg",
      "post_thumbnail": {
        "ID": 2906,
        "URL": "https://gattiecani.files.wordpress.com/2017/01/16114254_1156235844490629_3675690371123784421_n1-e1485802092358.jpg",
        "guid": "http://gattiecani.files.wordpress.com/2017/01/16114254_1156235844490629_3675690371123784421_n1.jpg",
        "mime_type": "image/jpeg",
        "width": 362,
        "height": 259
      },
      "format": "standard",
      "geo": false,
      "menu_order": 0,
      "page_template": "",
      "publicize_URLs": [],
      "terms": {
        "category": {
          "Cani": {
            "ID": 35415871,
            "name": "Cani",
            "slug": "cani-2",
            "description": "",
            "post_count": 12,
            "parent": 0,
            "meta": {
              "links": {
                "self": "https://public-api.wordpress.com/rest/v1.1/sites/60730919/categories/slug:cani-2",
                "help": "https://public-api.wordpress.com/rest/v1.1/sites/60730919/categories/slug:cani-2/help",
                "site": "https://public-api.wordpress.com/rest/v1.1/sites/60730919"
              }
            }
          }
        },
        "post_tag": {},
        "post_format": {},
        "mentions": {}
      },
      "tags": {},
      "categories": {
        "Cani": {
          "ID": 35415871,
          "name": "Cani",
          "slug": "cani-2",
          "description": "",
          "post_count": 12,
          "parent": 0,
          "meta": {
            "links": {
              "self": "https://public-api.wordpress.com/rest/v1.1/sites/60730919/categories/slug:cani-2",
              "help": "https://public-api.wordpress.com/rest/v1.1/sites/60730919/categories/slug:cani-2/help",
              "site": "https://public-api.wordpress.com/rest/v1.1/sites/60730919"
            }
          }
        }
      },
      "attachments": {
        "2905": {
          "ID": 2905,
          "URL": "https://gattiecani.files.wordpress.com/2017/01/16114254_1156235844490629_3675690371123784421_n.jpg",
          "guid": "http://gattiecani.files.wordpress.com/2017/01/16114254_1156235844490629_3675690371123784421_n.jpg",
          "date": "2017-01-30T19:47:49+01:00",
          "post_ID": 2904,
          "author_ID": 54646473,
          "file": "16114254_1156235844490629_3675690371123784421_n.jpg",
          "mime_type": "image/jpeg",
          "extension": "jpg",
          "title": "16114254_1156235844490629_3675690371123784421_n",
          "caption": "",
          "description": "",
          "alt": "",
          "thumbnails": {
            "thumbnail": "https://gattiecani.files.wordpress.com/2017/01/16114254_1156235844490629_3675690371123784421_n.jpg?w=150",
            "medium": "https://gattiecani.files.wordpress.com/2017/01/16114254_1156235844490629_3675690371123784421_n.jpg?w=300",
            "large": "https://gattiecani.files.wordpress.com/2017/01/16114254_1156235844490629_3675690371123784421_n.jpg?w=960"
          },
          "height": 960,
          "width": 960,
          "exif": {
            "aperture": "0",
            "credit": "",
            "camera": "",
            "caption": "",
            "created_timestamp": "0",
            "copyright": "",
            "focal_length": "0",
            "iso": "0",
            "shutter_speed": "0",
            "title": "",
            "orientation": "0",
            "keywords": []
          },
          "meta": {
            "links": {
              "self": "https://public-api.wordpress.com/rest/v1.1/sites/60730919/media/2905",
              "help": "https://public-api.wordpress.com/rest/v1.1/sites/60730919/media/2905/help",
              "site": "https://public-api.wordpress.com/rest/v1.1/sites/60730919",
              "parent": "https://public-api.wordpress.com/rest/v1.1/sites/60730919/posts/2904"
            }
          }
        },
        "2906": {
          "ID": 2906,
          "URL": "https://gattiecani.files.wordpress.com/2017/01/16114254_1156235844490629_3675690371123784421_n1-e1485802092358.jpg",
          "guid": "http://gattiecani.files.wordpress.com/2017/01/16114254_1156235844490629_3675690371123784421_n1.jpg",
          "date": "2017-01-30T19:48:00+01:00",
          "post_ID": 2904,
          "author_ID": 54646473,
          "file": "16114254_1156235844490629_3675690371123784421_n1-e1485802092358.jpg",
          "mime_type": "image/jpeg",
          "extension": "jpg",
          "title": "16114254_1156235844490629_3675690371123784421_n",
          "caption": "",
          "description": "",
          "alt": "",
          "thumbnails": {
            "thumbnail": "https://gattiecani.files.wordpress.com/2017/01/16114254_1156235844490629_3675690371123784421_n1-e1485802092358.jpg?w=150",
            "medium": "https://gattiecani.files.wordpress.com/2017/01/16114254_1156235844490629_3675690371123784421_n1-e1485802092358.jpg?w=300",
            "large": "https://gattiecani.files.wordpress.com/2017/01/16114254_1156235844490629_3675690371123784421_n1-e1485802092358.jpg?w=362"
          },
          "height": 259,
          "width": 362,
          "exif": {
            "aperture": "0",
            "credit": "",
            "camera": "",
            "caption": "",
            "created_timestamp": "0",
            "copyright": "",
            "focal_length": "0",
            "iso": "0",
            "shutter_speed": "0",
            "title": "",
            "orientation": "0",
            "keywords": []
          },
          "meta": {
            "links": {
              "self": "https://public-api.wordpress.com/rest/v1.1/sites/60730919/media/2906",
              "help": "https://public-api.wordpress.com/rest/v1.1/sites/60730919/media/2906/help",
              "site": "https://public-api.wordpress.com/rest/v1.1/sites/60730919",
              "parent": "https://public-api.wordpress.com/rest/v1.1/sites/60730919/posts/2904"
            }
          }
        }
      },
      "attachment_count": 2,
      "metadata": [
        {
          "id": "8922",
          "key": "geo_public",
          "value": "0"
        },
        {
          "id": "8917",
          "key": "_thumbnail_id",
          "value": "2906"
        }
      ],
      "meta": {
        "links": {
          "self": "https://public-api.wordpress.com/rest/v1.1/sites/60730919/posts/2904",
          "help": "https://public-api.wordpress.com/rest/v1.1/sites/60730919/posts/2904/help",
          "site": "https://public-api.wordpress.com/rest/v1.1/sites/60730919",
          "replies": "https://public-api.wordpress.com/rest/v1.1/sites/60730919/posts/2904/replies/",
          "likes": "https://public-api.wordpress.com/rest/v1.1/sites/60730919/posts/2904/likes/"
        }
      },
      "capabilities": {
        "publish_post": false,
        "delete_post": false,
        "edit_post": false
      },
      "other_URLs": {}
    }
  ]
}
petrosh commented 8 years ago

Reddit

Json

var post = response[0].data.children[0].data expose

[
  {
    "data": {
      "children": [
        {
          "data": {
            "selftext": "... markdown with \n ...",
            "subreddit":"books",
            "score": 35,
            "created_utc":1472260734.0,
            "num_comments":6
          }
        }
      ]
    }
  },
  {
    ...
  }
]

After "\n\u00...".normalize():

The Boston Globe reported on the Ivy League required reading lists, there's a lot of overlap and you can get the list from their website but I went through and pulled the one's that are available online for free, many of which are fewer than 100 pages long.

Title Author Number of Pages
Letter From the Birmingham Jail Martin Luther King Jr. 9
Suicide Émile Durkheim 20
Apology Plato 23
The Elements of Style William Strunk 26
The Clash of Civilizations Samuel Huntington 29
Meditations on First Philosophy René Descartes 33
The German Ideology Karl Marx 60
The Communist Manifesto Karl Marx 68
The Prince Nicolò Machiavelli 131
The Presentation of Self in Everyday Life Erving Goffman 170
Leviathan Thomas Hobbes 445
A Theory of Justice John Rawis 560
petrosh commented 7 years ago

List of APIs