Skip to content

Export your Discogs.com collection value to CloudWatch Metrics

License

Notifications You must be signed in to change notification settings

sbstjn/discogs-collection

Repository files navigation

⚡️ Discogs Collection Info

CircleCI license Coveralls

Crawl the value of your Discogs 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.

Discogs.com Collection Value

Additionally, this creates an HTTP endpoint /last that returns the most recent item in your library.

{
  "artist": "Lakman",
  "title": "Aus Dem Schoß Der Psychose",
  "year": 2016
}

Install

$ > 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 for accessing the Discogs API, then use Serverless to deploy everything:

$ > TOKEN=YOUR_DISCOGS_ACCESS_TOKEN yarn deploy && yarn invoke

Usage

Serverless 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.

events:
  - schedule: rate(10 minutes)

License

Feel free to use the code, it's released using the MIT license.

Contributors

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. It outlines core values and believes and will make working together a happier experience.

About

Export your Discogs.com collection value to CloudWatch Metrics

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published