Skip to content

she-codes-crowdfunding-api-project-supremeoverlord-ofdoom created by GitHub Classroom

Notifications You must be signed in to change notification settings

SheCodesAus/she-codes-crowdfunding-api-project-supremeoverlord-ofdoom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

she-codes-crowdfunding-api-project-supremeoverlord-ofdoom

she-codes-crowdfunding-api-project-supremeoverlord-ofdoom created by GitHub Classroom

Crowdfunding API Project: Gnome My Enemy

​ "Gnome My Enemy" is a crowdfunding platform designed for individuals seeking to gnome someone. Gnoming is the act of placing a large number of gnomes in a particular area (commonly someone's garden), often as a form of creative expression and revenge. Our platform allows users to crowdfund the necessary resources to execute their gnome projects, whether it be as a form of retaliation or simply for personal enjoyment.

The target audience for "Gnome My Enemy" includes anyone who wants to gnome someone but lacks the funds to purchase the required gnomes. Our user-friendly interface makes it simple for individuals to raise money or donated gnomes for their projects and bring their gnome visions to life.

In conclusion, "Gnome My Enemy" is a unique platform that provides a means for individuals to express themselves through gnoming. Whether it's for revenge or for personal fulfillment, this platform offers a way for people to bring their gnome projects to fruition.

MVP Plan Submission

Features

User Accounts

  • Username
  • Email Address
  • Password ​

Project

  • Create a project
    • Title
    • Owner (a user)
    • Description
    • Image
    • Target Amount to Fundraise
    • Open/Close (Accepting new supporters)
    • When was the project created
  • Ability to pledge to a project
    • An amount
    • The project the pledge is for
    • The supporter
    • Whether the pledge is anonymous
    • A comment to go with the pledge

Implement suitable update delete

Note: Not all of these may be required for your project, if you have not included one of these please justify why.

  • Project
    • Create
    • Retrieve
    • Update
    • Destroy - projects cannot be deleted (to avoid problems), the owner can edit them to be closed for pledges
  • Pledge
    • Create
    • Retrieve
    • Update
    • Destroy
  • User
    • Create
    • Retrieve
    • Update
    • Destroy - users cannot be deleted (to avoid problems) ​

Implement suitable permissions

Note: Not all of these may be required for your project, if you have not included one of these please justify why.

  • Project
    • Limit who can create
    • Limit who can retrieve - not necessary to restrict this currently
    • Limit who can update
    • Limit who can delete
  • Pledge
    • Limit who can create
    • Limit who can retrieve - pledges asscoiated to a user
    • Limit who can update
    • Limit who can delete
  • User
    • Limit who can retrieve - user detail view is restricted to the logged in user
    • Limit who can update
    • Limit who can delete ​

Implement relevant status codes

  • Get returns 200
  • Create returns 201
  • Not found returns 404 ​

Handle failed requests gracefully

  • 404 response returns JSON rather than text ​

Use token authentication

  • impliment /api-token-auth/ ​

Additional features

  • Feature: List of pledges assoicated with project
    • Description: All pledges are listed under the Project Detail ​
  • Feature: List of user's pledges
    • Description: All user's pledges are listed in the User Detail, this view is restricted to the logged in user to keep anonymous pledges anonymous (otherwise people could see who anonymous pledges are linked to) ​
  • Feature: Current total funded
    • Description: Total amolunt raised from pledges is calulcated ​
  • Feature: Change password
    • Description: User password can be changed (as long as you remember the current password ​

External libraries used

  • none

Part A Submission

Step by step instructions for how to register a new user and create a new project (i.e. endpoints and body data).

  1. Create User ​
curl --request POST \
  --url http://localhost:8000/users/ \
  --header 'Authorization: Token c00thisisafaketoken' \
  --header 'Content-Type: application/json' \
  --data '{
	"email": "[email protected]",
  "username": "test_user",
	"password": "not_a_real_password"
}'

​ 2. Sign in User ​

curl --request POST \
  --url http://localhost:8000/api-token-auth/ \
  --header 'Content-Type: application/json' \
  --data '{
	"username": "test_user",
	"password": "not_a_real_password"
}'

​ 3. Create Project ​

curl --request POST \
  --url http://localhost:8000/projects/ \
  --header 'Authorization: Token  c00thisisafaketoken' \
  --header 'Content-Type: application/json' \
  --data '{
	
"title": "Arch enemy gnoming",
		"description": "My one final nemesis has taken it too far and copied my artwork of a loaf of bread, so I need to get even - gnome style",
		"goal": 500,
		"image": "https://perthlocalguide.com/wp-content/uploads/2021/09/Gnomesville-Image-2.jpg",
		"is_open": true,
	"date_created": "2023-01-29T13:05:49.764Z"
}
'

About

she-codes-crowdfunding-api-project-supremeoverlord-ofdoom created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published