Skip to content

osmamousa/My-Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Charitable Tracker API

This API allows a user to Create, Set and Track Monetary and Volunteer Goals. Tracked Goals will then be displayed in interactive Graphs.

Models

  • User
  • Profile
    • Fields
      • User: FK
      • annual_income: intField
      • profile_pic:URLField
  • Goal
    • Fields
      • Created_At: DateField
      • User: FK
      • dgoaltitle: CharField
      • dollars: IntFeld
      • vgoaltitle: CharField
      • hours: IntField
      • interval: CharField (Drop Down)
  • Record
    • Fields
      • User: FK
      • goal: FK
      • amountdonated: IntField
      • created_at: DateField
      • hoursdonated: IntField
      • description: CharField
      • cause: charField (Drop Down)
      • organization = CharField
  • Document
    • Fields
      • User: FK
      • uploaded_at: DateTimeField
      • upload: ImgField
      • drecipt: FK
      • vreceipt: FK
  • EmailReminder
    • Fields
      • user: FK
      • Email:EmailField
      • subscribe: Boolean
      • Your_reminder: CharField
      • Interval: (Drop Down)

API Endpoints

Method Endpoint Description Deployed URL
GET /api/Dgoals/ View All Donation Goals filter form newest to oldest Yes [https://charitable-tracker.herokuapp.com/api/Dgoals/]
POST /api/Dgoals/ Add a donation goal Yes [https://charitable-tracker.herokuapp.com/api/Dgoals/]
PUT /api/Dgoal/int:pk/ Edit a singular donation goal Yes [https://charitable-tracker.herokuapp.com/api/Dgoal/int:pk/]
DELETE /api/Dgoal/int:pk/ Delete a singular donation goal Yes [https://charitable-tracker.herokuapp.com/api/Dgoal/int:pk/]
GET /api/Vgoals/ View all volunteer goals filter from newest to oldest Yes [https://charitable-tracker.herokuapp.com/api/Vgoals/]
POST /api/Vgoals/ Create a volunteer goal Yes [https://charitable-tracker.herokuapp.com/api/Vgoals/]
PUT /api/Vgoal/int:pk/ Edit a volunteer goal Yes [https://charitable-tracker.herokuapp.com/api/Vgoal/int:pk/]
Delete /api/Vgoal/int:pk/ Delete a volunteer goal Yes [https://charitable-tracker.herokuapp.com/api/Vgoal/int:pk/]
GET /api/Drecords/ View all donation records Yes [https://charitable-tracker.herokuapp.com/api/Drecords/]
POST /api/Drecords/ Create a new donation record Yes [https://charitable-tracker.herokuapp.com/api/Drecords/]
PUT /api/Drecord/int:pk/ Edit a specific donation record Yes [https://charitable-tracker.herokuapp.com/api/Drecord/int:pk/]
DELETE /api/Drecord/int:pk/ Delete a specific donation record Yes [https://charitable-tracker.herokuapp.com/api/Drecord/int:pk/]
GET /api/Vrecords/ View all volunteer records Yes [https://charitable-tracker.herokuapp.com/api/Vrecords/]
POST /api/Vrecords/ Add a volunteer record Yes [https://charitable-tracker.herokuapp.com/api/Vrecords/]
GET /api/Vrecord/int:pk/ View a specific volunteer record Yes [https://charitable-tracker.herokuapp.com/api/Vrecord/int:pk]
PUT /api/Vrecord/int:pk/ Edit a specific volunteer record Yes [https://charitable-tracker.herokuapp.com/api/Vrecord/int:pk]
DELETE /api/Vrecord/int:pk/ Delete a specific volunteer record Yes [https://charitable-tracker.herokuapp.com/api/Vrecord/int:pk/]
GET /auth/login Login Yes [https://charitable-tracker.herokuapp.com/auth/login]
GET api/annualincome/ How much Each user Makes Yes [https://charitable-tracker.herokuapp.com/api/annualincome/]
POST api/annualincome/ How much Each user Makes Yes [https://charitable-tracker.herokuapp.com/api/annualincome/]
PUT api/annualincome/int:pk/ Edit How much Each user Makes Yes [https://charitable-tracker.herokuapp.com/api/annualincome/int:pk/]
DELETE api/annualincome/int:pk/ Delete How much Each user Makes Yes [https://charitable-tracker.herokuapp.com/api/annualincome/int:pk/]
GET /api/reminders/ View All Reminders No [https://charitable-tracker.herokuapp.com/api/reminders/]]
POST /api/reminders/ Add a Reminder No [https://charitable-tracker.herokuapp.com/api/reminders/]
PUT /api/reminders/int:pk/ Edit a Reminder No [https://charitable-tracker.herokuapp.com/api/reminders/int:pk/]
DELETE /api/reminders/int:pk/ Delete a Reminder NO [https://charitable-tracker.herokuapp.com/api/reminders/int:pk/]
POST /auth/registration/ regiestration Yes [https://charitable-tracker.herokuapp.com/auth/registration/]
GET /api/causetime/ View cause and time [https://charitable-tracker.herokuapp.com/api/causetime/]
GET /api/causedonation/ View cause and donation [https://charitable-tracker.herokuapp.com/api/causedonation/]
GET /api/organizationtime/ View organization and time Yes [https://charitable-tracker.herokuapp.com/api/organizationtime/]
GET /api/organizationdonation/ View organization and donation Yes [https://charitable-tracker.herokuapp.com/api/organizationdonation/]
POST /api/upload/ Upload Img Yes [https://charitable-tracker.herokuapp.com/api/upload/]
GET /api/upload/ List of all Imgs [https://charitable-tracker.herokuapp.com/api/upload/]
PUT /api/upload/int:pk Edit a spicific img upload [https://charitable-tracker.herokuapp.com/api/upload/int:pk]
DELETE /api/upload/int:pk Delete a spicific img [https://charitable-tracker.herokuapp.com/api/upload/int:pk]

Back to Endpoints

View all donation goals

GET /api/Dgoals/
https://charitable-tracker.herokuapp.com/api/Dgoals/
This Can be Empty

response

[
	{
		"pk": 1,
		"dgoaltitle": "Osama",
		"dollars": 78,
		"interval": "Week",
		"created_at": "2022-05-04"
	},
	{
		"pk": 2,
		"dgoaltitle": "Osama",
		"dollars": 78,
		"interval": "Week",
		"created_at": "2022-04-01"
	}
]

Back to Endpoints

Add a donation goal

POST /api/Dgoals/
https://charitable-tracker.herokuapp.com/api/Dgoals/
{
	"dgoaltitle":"Osama",
	"dollars":78,
	"interval":"Week",
	"created_at":"2022-04-1"
}

response

{
	"pk": 2,
	"dgoaltitle": "Osama",
	"dollars": 78,
	"interval": "Week",
	"created_at": "2022-04-01"
}

Back to Endpoints

Edit a singular donation goal

PUT /api/Dgoal/<int:pk>/
https://charitable-tracker.herokuapp.com/api/Dgoal/<int:pk>/
{
	"dgoaltitle": "Osama",
	"dollars": 58,
	"interval": "Week",
	"created_at": "2022-05-04"
}

response

{
	"pk": 1,
	"dgoaltitle": "Osama",
	"dollars": 58,
	"interval": "Week",
	"created_at": "2022-05-04"
}

Back to Endpoints

Delete a singular donation goal

DELETE /api/Dgoal/<int:pk>/
https://charitable-tracker.herokuapp.com/api/Dgoal/<int:pk>/
This Can be blank

response

No body returned for response

Back to Endpoints

View all volunteer goals

GET /api/Vgoals/
https://charitable-tracker.herokuapp.com/api/Vgoals/
This Can be blank

response

[
	{
		"pk": 1,
		"vgoaltitle": "",
		"hours": null,
		"interval": "Week",
		"created_at": "2022-05-04"
	}
]

Back to Endpoints

Create a volunteer goal

POST /api/Vgoals/
https://charitable-tracker.herokuapp.com/api/Vgoals/
	{
		"vgoaltitle": "Self Care!",
		"hours": 5,
		"interval": "Week",
		"created_at": "2022-05-04"
	}

response

{
	"pk": 3,
	"vgoaltitle": "Self Care!",
	"hours": 5,
	"interval": "Week",
	"created_at": "2022-05-04"
}

Back to Endpoints

Edit a volunteer goal

PUT /api/Vgoal/<int:pk>/
https://charitable-tracker.herokuapp.com/api/Vgoal/<int:pk>/
{
	"vgoaltitle": "Self Care!",
	"hours": 8,
	"interval": "Week",
	"created_at": "2022-05-04"
}

response

{
	"pk": 3,
	"vgoaltitle": "Self Care!",
	"hours": 8,
	"interval": "Week",
	"created_at": "2022-05-04"
}

Back to Endpoints

Delete a volunteer goal

DELETE /api/Vgoal/<int:pk>/
https://charitable-tracker.herokuapp.com/api/Vgoal/<int:pk>/
This Can be Empty

response

No body returned for response

Back to Endpoints

View all donation records

GET /api/Drecords/
https://charitable-tracker.herokuapp.com/api/Drecords/
This Can be Empty

response

[
	{
		"pk": 1,
		"amountdonated": 4,
		"created_at": "2022-04-27",
		"organization": "MSA",
		"cause": "Religion",
		"goal": "Osama"
	}
]

Back to Endpoints

Create a new donation record

POST /api/Drecords/
https://charitable-tracker.herokuapp.com/api/Drecords/
{
	"amountdonated": 4,
	"created_at": "2022-04-27",
	"organization": "MSA",
	"cause": "Religion"
}

response

{
	"pk": 1,
	"amountdonated": 4,
	"created_at": "2022-04-27",
	"organization": "MSA",
	"cause": "Religion",
	"goal": "Osama"
}

Back to Endpoints

Edit a specific donation record

PUT /api/Drecord/<int:pk>/
https://charitable-tracker.herokuapp.com/api/Drecord/<int:pk>/
{
	"amountdonated": 999,
	"created_at": "2022-04-27",
	"organization": "MSA",
	"cause": "Religion",
	"goal": "Osama"
}

response

{
	"pk": 2,
	"amountdonated": 999,
	"created_at": "2022-04-27",
	"organization": "MSA",
	"cause": "Religion",
	"goal": "Osama"
}

Back to Endpoints

Delete a specific donation record

DELETE  /api/Drecord/<int:pk>/
https://charitable-tracker.herokuapp.com/api/Drecord/<int:pk>/
This can be blank

response

No body returned for response

Back to Endpoints

View all volunteer records

GET /View all volunteer records/
https://charitable-tracker.herokuapp.com/api/Vrecords/
This can be blank

response

{
	"pk": 3,
	"hoursdonated": 3,
	"created_at": "2022-04-28",
	"organization": "2",
	"description": "Will this Work",
	"cause": "Animals",
	"goal": null
},

Back to Endpoints

Add a volunteer record

POST  /api/Vrecords/
https://charitable-tracker.herokuapp.com/api/Vrecords/
{
	"hoursdonated": 3,
	"created_at": "2022-04-28",
	"organization": "2",
	"description": "Will this Work",
	"cause": "Animals",
	"goal": 3
}

response

{
	"pk": 4,
	"hoursdonated": 3,
	"created_at": "2022-04-28",
	"organization": "2",
	"description": "Will this Work",
	"cause": "Animals",
	"goal": 3
}

Back to Endpoints

View a specific volunteer record

GET  /api/Vrecord/<int:pk>/
https://charitable-tracker.herokuapp.com/api/Vrecord/<int:pk>/
This can be blank

response

{
	"pk": 3,
	"hoursdonated": 3,
	"created_at": "2022-04-28",
	"organization": "2",
	"description": "Will this Work",
	"cause": "Animals",
	"goal": null
}

Back to Endpoints

Edit a specific volunteer record

PUT  /api/Vrecord/<int:pk>/
https://charitable-tracker.herokuapp.com/api/Vrecord/<int:pk>/
{
	"hoursdonated": 3,
	"created_at": "2022-04-28",
	"organization": "2",
	"description": "Will this Work",
	"cause": "Animals",
	"goal": 3
}

response

{
	"pk": 3,
	"hoursdonated": 3,
	"created_at": "2022-04-28",
	"organization": "2",
	"description": "Will this Work",
	"cause": "Animals",
	"goal": 3
}

Back to Endpoints

Delete a specific volunteer record

DELETE  /api/Vrecord/<int:pk>/
https://charitable-tracker.herokuapp.com/api/Vrecord/<int:pk>/
This can be blank

response

No body returned for response

Back to Endpoints

Login

POST  /auth/login
https://charitable-tracker.herokuapp.com/auth/login
{
	"username":"Osama",
	"password":"osamamousa",
	"password2":"osamamousa"
}

response

{
	"key": "fb106dc266d3c98b20f1b969fb9a005435347ec1"
}

Back to Endpoints

List How much Each user Makes

GET  /api/annualincome/
https://charitable-tracker.herokuapp.com/api/annualincome/
None

response

{
	"pk": 1,
	"annual_income": 87000,
	"profile_pic": ""
}

Back to Endpoints

Create how much each user makes

POST  /api/annualincome/
https://charitable-tracker.herokuapp.com/api/annualincome/
{
	"annual_income": 87000
}

response

{
	"pk": 1,
	"annual_income": 87000,
	"profile_pic": ""
}

Back to Endpoints

Edit how much each user makes

PATCH  /api/annualincome/<int:pk>/
https://charitable-tracker.herokuapp.com/api/annualincome/<int:pk>/
{
	"annual_income": 69
}

response

{
	"pk": 1,
	"annual_income": 69,
	"profile_pic": ""
}

Back to Endpoints

DELETE how much each user makes

DELETE  /api/annualincome/<int:pk>/
https://charitable-tracker.herokuapp.com/api/annualincome/<int:pk>/
None

response

None

Back to Endpoints

List Upload Img

GET /api/upload/
https://charitable-tracker.herokuapp.com/api/upload/
None

response

{
	"upload": "https://charitabletracker.s3.amazonaws.com/reciepts/aaaa.jpg"
}


Back to Endpoints

Upload Img

POST /api/upload/
https://charitable-tracker.herokuapp.com/api/upload/
Select Img (.jpg), Have the following headers
Content-Disposition, attachment;filename=
	file name must match the uploaded img name

response

{
	"upload": "https://charitabletracker.s3.amazonaws.com/reciepts/aaaa.jpg"
}


Back to Endpoints

Edit Upload Img

PATCH /api/upload/<int:pk>/
https://charitable-tracker.herokuapp.com/api/upload/<int:pk>/
Select Img (.jpg), Have the following headers
Content-Disposition, attachment;filename=
	file name must match the uploaded img name

response

{
	"upload": "https://charitabletracker.s3.amazonaws.com/reciepts/aaaa.jpg"
}


Back to Endpoints

DELETE Upload Img

POST /api/upload/<int:pk>/
https://charitable-tracker.herokuapp.com/api/upload/<int:pk>/
Select Img (.jpg), Have the following headers
Content-Disposition, attachment;filename=
	file name must match the uploaded img name

response

deleted


Back to Endpoints

View All Reminders

GET /api/reminders/
https://charitable-tracker.herokuapp.com/api/reminders/
This Can be Empty

response

{
	"email": "osamamousa048@gmail.com",
	"subscribe": true,
	"interval": "BiWeekly",
	"your_reminder": "Hey u are awsome"
}

Back to Endpoints

POST A Reminder

POST /api/reminders/
https://charitable-tracker.herokuapp.com/api/reminders/
This Can be Empty

response

{
	"email": "osamamousa048@gmail.com",
	"subscribe": true,
	"interval": "BiWeekly",
	"your_reminder": "Hey u are awsome"
}

Back to Endpoints

Edit A Reminder

PATCH /api/reminders/<int:pk>
https://charitable-tracker.herokuapp.com/api/reminders/api/reminders/<int:pk>
This Can be Empty

response

{
	"email": "osamamousa048@gmail.com",
	"subscribe": true,
	"interval": "BiWeekly",
	"your_reminder": "Hey u are awsome"
}

Back to Endpoints

DELETE A Reminder

DELETE /api/reminders/<int:pk>
https://charitable-tracker.herokuapp.com/api/reminders//api/reminders/<int:pk
This Can be Empty

response

{
	"email": "osamamousa048@gmail.com",
	"subscribe": true,
	"interval": "BiWeekly",
	"your_reminder": "Hey u are awsome"
}

Back to Endpoints

registration

POST  /auth/registration/
https://charitable-tracker.herokuapp.com/auth/registration/
{
	"username":"insomniatest",
	"password1":"o76218333",
	"password2":"o76218333"
}

response

{
	"key": "45973839a6219a439d9ae6608904b6c35abee88e"
}

Back to Endpoints

View cause and time

GET  /api/causetime/
https://charitable-tracker.herokuapp.com/api/causetime/
This Can Be blank

response

needs updated

Back to Endpoints

View cause and donation

GET  /api/causedonation/
https://charitable-tracker.herokuapp.com/api/causedonation/
This Can Be blank

response

[
	{
		"amountdonated": 3,
		"cause": "Women's Rights"
	},
	{
		"amountdonated": 3,
		"cause": "Women's Rights"
	}
]

Back to Endpoints

View cause and donation

GET  /api/causedonation/
https://charitable-tracker.herokuapp.com/api/causedonation/
This Can Be blank

response

needs updated

Back to Endpoints

View organization and time

GET api/organizationtime/
https://charitable-tracker.herokuapp.com/api/organizationtime/
This Can Be blank

response

needs updated

Back to Endpoints

View organization and donation

GET api/organizationdonation/
https://charitable-tracker.herokuapp.com/api/organizationdonation/
This Can Be blank

response

[
	{
		"amountdonated": 3,
		"organization": "Testing Insomnia"
	},
	{
		"amountdonated": 3,
		"organization": "Testing Insomnia"
	}
]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published