A detail page for a crowd-funding campaign
- https://github.com/HiveFunder/comments-module
- https://github.com/HiveFunder/support-module-svc
- https://github.com/HiveFunder/updates-service
To seed data for this project, first run node db/largeDataGenAndSeed.js
, then run the bash shell script ./db/mongoSeed.sh
, both of which from the project root.
If your laptop has an SSD, it should take no more than 30 minutes to generate and seed everything!
- Campaign: Campaign name, description, author, username, country, pledge amount, pledge goal, backers, end date, type
- Pledge: username, pledge amount, date
/:user/:campaignId/
- Get stats from a single campaign, for an item detail view.
- Query format: Campaign ID (number)
- Response data shape: Refer to Campaign data shape above
- Error code: 400 for invalid author or campaign
- Get all campaigns for given author (user)
- Query format: campaign user (string)
- Response data shape: Array of all Campaigns from author
- Error code: 400 for invalid author
- Creates a new campaign.
- Body data shape: Campaign name, description, author, currency, pledge goal, end date, type, location
- Error code: 400 if any fields in the body are missing
- Creates a new pledge for a given campaign.
- Query format: Campaign ID (number)
- Body data shape: Refer to Pledge data shape above
- Error code: 400 for invalid author or campaign
- Updates an existing campaign pledge amount and numbers
- Query format: Campaign ID (number)
- Body data shape: Pledge amount, new pledges
- Error code: 400 for invalid author or campaign
- Updates an existing campaign.
- Query format: Campaign ID (number)
- Body data shape: Refer to campaign data shape above
- Error code: 400 for invalid author or campaign
- Deletes an existing campaign, and all pledges for the campaign.
- Query format: Campaign ID (number)
- Error code: 400 for invalid author or campaign