Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
L04DB4L4NC3R committed Sep 19, 2019
1 parent 8bd6462 commit 51e3d39
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 6 deletions.
53 changes: 51 additions & 2 deletions docs/api_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ define({ "api": [
"examples": [
{
"title": "request-example",
"content": "{\n\t\"email\":\"test1@test.com\",\n\t\"org\":\"GDG-VIT\"\n}",
"content": "{\n\t\"email\":\"test1@test.com\",\n\t\"org\":\"GDG-VIT\",\n\"accept\": true\n}",
"type": "json"
},
{
Expand All @@ -1363,6 +1363,55 @@ define({ "api": [
"filename": "organization/endpoints/join_handler.go",
"groupTitle": "organization"
},
{
"type": "get",
"url": "/api/v1/org/bulk-attendees",
"title": "Create attendees in bulk",
"name": "Create_attendees_in_bulk",
"group": "organization",
"permission": [
{
"name": "member"
}
],
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "string",
"optional": false,
"field": "organization",
"description": "<p>name of the organization</p>"
},
{
"group": "Parameter",
"type": "string",
"optional": false,
"field": "eventname",
"description": "<p>name of the event</p>"
},
{
"group": "Parameter",
"type": "object",
"optional": false,
"field": "attendees",
"description": "<p>list of attendees</p>"
}
]
},
"examples": [
{
"title": "request-example",
"content": "\n{\n\t\"eventname\": \"developer 101\",\n\t\"organization\": \"DSC VIT\",\n\t\"attendees\": [{\n\t\t\"name\": \"Vamsee\",\n\t\t\"registrationNumber\": \"17BCB0068\",\n\t\t\"email\": \"vamseevk2001@gmail.com\",\n\t\t\"phoneNumber\": \"9390214409\",\n\t\t\"gender\": \"F\",\n\t}, {\n\t\t\"name\": \"Vamsee\",\n\t\t\"registrationNumber\": \"17BCB0069\",\n\t\t\"email\": \"vamseevk2001@gmail.com\",\n\t\t\"phoneNumber\": \"9390214409\",\n\t\t\"gender\": \"F\",\n\t}]\n}",
"type": "json"
}
]
},
"version": "0.0.0",
"filename": "organization/endpoints/bulk_handler.go",
"groupTitle": "organization"
},
{
"type": "get",
"url": "/api/v1/org/org-events",
Expand Down Expand Up @@ -1547,7 +1596,7 @@ define({ "api": [
"examples": [
{
"title": "request-example",
"content": "\ncurl localhost/api/v1/org/view-req?q=GDG-VIT -H '{\"Authorization\":\"asdbasbdbasjdbasjhbdhasd\"}'",
"content": "\ncurl localhost/api/v1/org/view-req?org=GDG-VIT -H '{\"Authorization\":\"asdbasbdbasjdbasjhbdhasd\"}'",
"type": "json"
},
{
Expand Down
53 changes: 51 additions & 2 deletions docs/api_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@
"examples": [
{
"title": "request-example",
"content": "{\n\t\"email\":\"test1@test.com\",\n\t\"org\":\"GDG-VIT\"\n}",
"content": "{\n\t\"email\":\"test1@test.com\",\n\t\"org\":\"GDG-VIT\",\n\"accept\": true\n}",
"type": "json"
},
{
Expand All @@ -1363,6 +1363,55 @@
"filename": "organization/endpoints/join_handler.go",
"groupTitle": "organization"
},
{
"type": "get",
"url": "/api/v1/org/bulk-attendees",
"title": "Create attendees in bulk",
"name": "Create_attendees_in_bulk",
"group": "organization",
"permission": [
{
"name": "member"
}
],
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "string",
"optional": false,
"field": "organization",
"description": "<p>name of the organization</p>"
},
{
"group": "Parameter",
"type": "string",
"optional": false,
"field": "eventname",
"description": "<p>name of the event</p>"
},
{
"group": "Parameter",
"type": "object",
"optional": false,
"field": "attendees",
"description": "<p>list of attendees</p>"
}
]
},
"examples": [
{
"title": "request-example",
"content": "\n{\n\t\"eventname\": \"developer 101\",\n\t\"organization\": \"DSC VIT\",\n\t\"attendees\": [{\n\t\t\"name\": \"Vamsee\",\n\t\t\"registrationNumber\": \"17BCB0068\",\n\t\t\"email\": \"vamseevk2001@gmail.com\",\n\t\t\"phoneNumber\": \"9390214409\",\n\t\t\"gender\": \"F\",\n\t}, {\n\t\t\"name\": \"Vamsee\",\n\t\t\"registrationNumber\": \"17BCB0069\",\n\t\t\"email\": \"vamseevk2001@gmail.com\",\n\t\t\"phoneNumber\": \"9390214409\",\n\t\t\"gender\": \"F\",\n\t}]\n}",
"type": "json"
}
]
},
"version": "0.0.0",
"filename": "organization/endpoints/bulk_handler.go",
"groupTitle": "organization"
},
{
"type": "get",
"url": "/api/v1/org/org-events",
Expand Down Expand Up @@ -1547,7 +1596,7 @@
"examples": [
{
"title": "request-example",
"content": "\ncurl localhost/api/v1/org/view-req?q=GDG-VIT -H '{\"Authorization\":\"asdbasbdbasjdbasjhbdhasd\"}'",
"content": "\ncurl localhost/api/v1/org/view-req?org=GDG-VIT -H '{\"Authorization\":\"asdbasbdbasjdbasjhbdhasd\"}'",
"type": "json"
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/api_project.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ define({
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
"time": "2019-09-04T10:13:58.826Z",
"time": "2019-09-19T14:31:09.499Z",
"url": "http://apidocjs.com",
"version": "0.17.7"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/api_project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
"time": "2019-09-04T10:13:58.826Z",
"time": "2019-09-19T14:31:09.499Z",
"url": "http://apidocjs.com",
"version": "0.17.7"
}
Expand Down
33 changes: 33 additions & 0 deletions organization/endpoints/bulk_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,39 @@ import (
"github.com/GDGVIT/Project-Hades/organization/endpoints/views"
)

/**
* @api {get} /api/v1/org/bulk-attendees Create attendees in bulk
* @apiName Create attendees in bulk
* @apiGroup organization
*
* @apiPermission member
* @apiParam {string} organization name of the organization
* @apiParam {string} eventname name of the event
* @apiParam {object} attendees list of attendees
*
*
* @apiParamExample {json} request-example
*
* {
* "eventname": "developer 101",
* "organization": "DSC VIT",
* "attendees": [{
* "name": "Vamsee",
* "registrationNumber": "17BCB0068",
* "email": "vamseevk2001@gmail.com",
* "phoneNumber": "9390214409",
* "gender": "F",
* }, {
* "name": "Vamsee",
* "registrationNumber": "17BCB0069",
* "email": "vamseevk2001@gmail.com",
* "phoneNumber": "9390214409",
* "gender": "F",
* }]
*}
*
**/

func bulkAddAttendees() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {

Expand Down

0 comments on commit 51e3d39

Please sign in to comment.