https://github.com/sbstjn/discogs-collection
Export your Discogs.com collection value to CloudWatch Metrics
https://github.com/sbstjn/discogs-collection
aws cloudwatch css discogs lambda serverless
Last synced: 7 months ago
JSON representation
Export your Discogs.com collection value to CloudWatch Metrics
- Host: GitHub
- URL: https://github.com/sbstjn/discogs-collection
- Owner: sbstjn
- License: mit
- Created: 2017-05-25T20:51:39.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-04T03:35:22.000Z (almost 9 years ago)
- Last Synced: 2025-06-22T22:02:39.042Z (10 months ago)
- Topics: aws, cloudwatch, css, discogs, lambda, serverless
- Language: TypeScript
- Size: 396 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# ⚡️ Discogs Collection Info
[](https://circleci.com/gh/sbstjn/discogs-collection)
[](https://github.com/sbstjn/discogs-collection/blob/master/LICENSE.md)
[](https://coveralls.io/github/sbstjn/discogs-collection)
Crawl the value of your [Discogs](https://discogs.com) Collection with AWS Lambda and log `maximum`, `minimum`, and `median` collection values, as well as the number of items in your collection to custom CloudWatch metrics.

Additionally, this creates an HTTP endpoint `/last` that returns the most recent item in your library.
```json
{
"artist": "Lakman",
"title": "Aus Dem Schoß Der Psychose",
"year": 2016
}
```
## Install
```bash
$ > yarn install
```
## Configure
Make sure to update your Discogs username in `serverless.yml` or set the `USERNAME` environment variable before you deploy your functions.
## Deploy
First [create an access token](https://www.discogs.com/de/settings/developers) for accessing the Discogs API, then use [Serverless](https://serverless.com) to deploy everything:
```bash
$ > TOKEN=YOUR_DISCOGS_ACCESS_TOKEN yarn deploy && yarn invoke
```
## Usage
[Serverless](https://serverless.com) will configure a CloudWatch Schedule that triggers the AWS Lambda function every 10 minutes per default. Just update the `serverless.yml` configuration and deploy your updated interval.
```yaml
events:
- schedule: rate(10 minutes)
```
## License
Feel free to use the code, it's released using the [MIT license](https://github.com/sbstjn/discogs-collection/blob/master/LICENSE.md).
## Contributors
- [Sebastian Müller](https://github.com/sbstjn)
## Contribution
You are more than welcome to contribute to this project! 😘
To make sure you have a pleasant experience, please read our [code of conduct](CODE_OF_CONDUCT.md). It outlines core values and believes and will make working together a happier experience.