Skip to content

you-genie/temp_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#API

GET ('/api/contacts/:facebook_key)

  • require:
  • response:
[
	{
		"_id": String,
		"email": String,
		"phoneNum": String,
		"name": String,
		"contactID": String,
		"facebook_key": String
	}
	...
]

POST ('/api/contacts/:facebook_key)

  • require:
[
	{
		"contactID": String,
		"name": String,
		"phoneNum": String,
		"email": String,
	}
]
  • response: {return: num}
  • if error found, num = 0 else, num = 1
    DELETE ('/api/contacts/:facebook_key)
  • require:
[
	{
		"contactID": String
	}
	...
]
  • response '{return: num}`
    *if error found, num = 0 else, num = 1

PUT ('/api/contacts/:facebook_key)

  • require:
[
	{
		"contactID": String (necessary)
		"name": String (unnecessary)
		"email": String(unnecessary)
		"phoneNum": String(unnecessary)
	}
]
  • response:
    {message: "contact updated"}
  • SHOULD NOT USE DIFFERENT contactID

POST (./api/photo/:facebook_key)

  • require:
    form-data
    name: "userfile"
    filename: String
    Content-Type: image/jpeg
  • response: {message: "All done"}
  • post one file to server.

POST (./api/photos/:facebook_key)

  • require:
    form-data files
    name: "userfile"
    filename: String
    Content-Type: image/jpeg
  • response: {message: "All done"}
  • post multiple file to server.

GET (./api/photos/:facebook_key)

  • require:
  • response:
[
	{
		"_id": String,
		"facebook_key": String,
		"photoName": String,
		"photoDir": String,
		"thumbDir": String
	}
	...
]

DELETE (./api/photos/:facebook_key)

  • require:
[
	{
		"_id": String
	}
	...
]
  • response:
    {"results": 1}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published