Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xasos/secret
(DEPRECATED) Unofficial API for Secret
https://github.com/xasos/secret
Last synced: about 1 month ago
JSON representation
(DEPRECATED) Unofficial API for Secret
- Host: GitHub
- URL: https://github.com/xasos/secret
- Owner: xasos
- License: mit
- Created: 2014-11-16T23:12:55.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-25T20:09:03.000Z (over 9 years ago)
- Last Synced: 2024-10-14T21:18:29.506Z (3 months ago)
- Language: JavaScript
- Homepage: https://secret-api.herokuapp.com/
- Size: 1.33 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Secret
======Unofficial API for Secret.
*Note: This is an unofficial API and is __not__ supported or controlled by Secret itself. Any questions, comments, feedback or feature requests should be directed to [xasos](http://github.com/xasos) or via an [issue](https://github.com/xasos/Secret/issues) in this repo.*
**Update 12/18/2014:** Secret has changed business models and removed the functionality to view Secrets on the web. This API is now deprecated.
**Update 04/29/2015:** Secret is no longer a company anymore :(
Usage
=====**Base URL:** [https://secret-api.herokuapp.com/](https://secret-api.herokuapp.com/)
**Output:** JSON
### Get today's popular secrets
Get popular secrets shared today in a certain category. Available categories include Popular, Money, Travel, College, Tinder, Weddings, Support, Food, Emoji, and Funny.
#### `GET /secrets/:category`
Example Query:
```
http://secret-api.herokuapp.com/secrets/popular
```Response:
```json
{
"status": "success",
"secrets": [
{
"url": "http://secret.ly",
"permalink": "/p/9sdf03ja001jdm1d980aj",
"comments": 150,
"secret": "I stole a tater tot from the table next to me.",
"image": "http://secret.ly/p/asp00q23jmsa.jpg",
"hearts": 466
},
...
...
```### Get comments for any post
Get comments in plain text and HTML format for a post.
#### `GET /:permalink`
Example Query:
```
http://secret-api.herokuapp.com/p/9sdf03ja001jdm1d980aj
```Response:
```json
{
"status": "success",
"post": {
"url": "http://secret.ly/",
"permalink": "/p/9sdf03ja001jdm1d980aj",
"comments": "150",
"secret": "I stole a tater tot from the table next to me.",
"image": "http://secret.ly/p/asp00q23jmsa.jpg",
"hearts": 466
},
"comments": [
{
"comment_html": "",
"comment": "",
"user": "red-heart",
"index": 1
},
...
...
```Start
=====```bash
$ npm install # install dependencies
$ node secret.js # start the server
```Deploy to Heroku
=====```bash
$ npm install # install dependencies
$ heroku create
$ (git add, git commit)
$ git push heroku master
```## License
[MIT License](LICENSE)