Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sibnerian/complimentary-mintz
Meteor quote repository with convenient API
https://github.com/sibnerian/complimentary-mintz
Last synced: 7 days ago
JSON representation
Meteor quote repository with convenient API
- Host: GitHub
- URL: https://github.com/sibnerian/complimentary-mintz
- Owner: sibnerian
- Created: 2013-08-06T21:45:22.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-08T04:55:24.000Z (over 11 years ago)
- Last Synced: 2024-04-14T11:08:44.645Z (10 months ago)
- Language: CoffeeScript
- Size: 262 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Complimentary Mintz
===================### Meteor quote repository with convenient API!
#### Live version
If you just want to see a live version of the site, head to [complimentary-mintz.meteor.com](http://complimentary-mintz.meteor.com/).
To access the API, visit [complimentary-mintz.meteor.com/quotesAPI](http://complimentary-mintz.meteor.com/quotesAPI).
If you want to see how the code works (or make a few tweaks and use it for a different professor!), read on.#### Configuration
Due to the fact that I don't want my Twitter credentials up on Github, you have to do some legwork to get a copy of this
up and running. All you need to do is add a folder called `server/secret` containing a file called `auth.coffee`.This file should look like:
```
@TWIT_AUTH =
consumer_key: 'your-consumer-key',
consumer_secret: 'your-consumer-secret',
access_token: 'your-access-token',
access_token_secret: 'your-access-token-secret'@SECRET_PASSWORD = 'you can use this to remove crap from the database'
```Use this file to store any other secret stuff that you need for production, but don't want anyone to see.
#### Running the code
If you already have Meteorite, you're golden! To get a local server up and running, just do
```
mrt install
mrt
```
If you DON'T - you should [install it](https://github.com/oortcloud/meteorite).#### Making changes
Complimentary Mintz searches Twitter every 20 seconds for more relevant tweets using the `searchForTweets` function in `server/tweeter.coffee`.
If you want to search for different keywords, all you need to do is modify the `searchTerms` array located in the same file.
You can also use getUserTweets to include all tweets made by a certain user - in the case of the Mintz site, this user is @MaxMintzzz.
All keywords specified this way will be filtered out of the published results.To remove stuff from the database, just pop up the javascript console in Chrome. There, you can run `Meteor.call('removeQuote', query, yourSecretPassWord)`
to get rid of anything fitting the mongo query `query` from the database. Don't give your password out, and nobody but you can successfully remove things.You'll probably want to change the HTML too. This is pretty self-explanatory, since all you'll need to change is the description.
Open up `complimentary-mintz.html` and go to town.#### API
Of course, this site would be fairly boring without an API. The API provides a convenient endpoint to grab
a large list of Mintz quotes, which can then be used (for example) as filler data for other projects. This endpoint is
`/quotesAPI` by default. You can change this endpoint if you want by changing the apiPath parameter in `server/startup.coffee`#### Shoutout
Shoutout to [Mike Bannister](https://github.com/possibilities) for making Meteorite and generally being awesome! Mike is dope!