Skip to content

shiva-6/Codeforces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VolunteeringAppBackend

Organization API

  • endpoint - /api/org/activity
    method - POST
    usage - Creates a new activity
    body - { type , description, location, time }
    response - { objectid } if successfull else error

  • endpoint - /api/org/volunteers?activityId
    method - GET
    usage - Fetches all the volunteers applied for a particular created activity
    body - { }
    response - { name, bio, location, rating } if successfull else error

  • endpoint - /api/org/rateVolunteers
    method - UPDATE
    usage - Rates volunteers according to the performance
    body - { volunteerId, Rating }
    response - { ...body } if successfull else error

  • endpoint - /api/org/activityStatus?activityId
    method - GET
    usage - Checks the status of the Activity
    body - { }
    response - { status } if successfull else error

  • endpoint - /api/org/activities
    method - GET
    usage - Gets all the activities posted by user
    body - { }
    response - { activities : [ { activityId, type, description, location, time }, ...] } if successfull else error

  • endpoint - /api/org/user
    method - POST
    usage - Creates a organizer
    body - { username, password, phonenumber }
    response - {...body} if successfull else error

Volunteers API

  • endpoint - /api/vol/activities?type&location&time
    method - GET
    usage - Gets all the activities around me based on location, type of activity and the time of the activity.
    body - { }
    response - { activities : [ { activityId, type, description, location, time }, ...] } if successfull else error

  • endpoint - /api/vol/joinActivity
    method - UPDATE
    usage - Confirm to join a activity
    body - { activityId }
    response - {...body} if successfull else error

  • endpoint - /api/vol/myActivities?userId method - GET
    usage - Gets the activities of a user
    body - { }
    response - { activities : [ { activityId, type, description, location, time }, ...] } if successfull else error

  • endpoint - /api/vol/user
    method - POST
    usage - Creates a volunteer
    body - { username, password, phonenumber }
    response - {...body} if successfull else error

Status Codes

Api Status Codes

Schema

Activity

{
    activityType: String,
    Time: String,
    Location: {
        address: String,
        Latitude: Number,
        Longitude: Number
    }
    Volunteers: [ Schema.Types.ObjectId ],
    Description: String,
    Status: String
}

Volunteer

{
    name: String,
    email: String,
    contactNumber: String,
    location: String,
    avgRating: Number,
    ratings: [ Number ],
    activities: [ Schema.Types.ObjectId ]
}

Organization

{
    name: String,
    email: String,
    orgDescription: String,
    contactNumber: String,
    location: String,
    activities: [ Schema.Types.ObjectId ]
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages