git clone https://github.com/jomwebjohor/members-api.git member
cd member
composer install
- SQLite
- Head to
http://localhost/member/jwj
to request token - Sends the token in Authorization header
- POST
/api/members
name
is requiredlocation
is requiredposition
is optionalcompany
is optionalskills
is optional, comma separated e.g PHP,Ruby,Pythonfacebook
is optionaltwitter
is optionalgithub
is optionaltelegram
is optional
- PUT
/api/members/{id}
name
is optionallocation
is optionalposition
is optionalcompany
is optionalskills
is optionalfacebook
is optionaltwitter
is optionalgithub
is optionaltelegram
is optional
- GET
/api/members/{username}
username
will try to search from member name, facebook, twitter, github & telegram username
- 200 OK
{
"name": "Salahuddin Hairai",
"location": "Kg Melayu Majidee, JB",
"position": "Software Engineer",
"company": "Financio Sdn Bhd",
"skills": [
"PHP",
"Laravel",
"Phalcon",
"Symfony",
"CodeIgniter"
],
"social": {
"facebook": {
"username": "salahuddin.hairai",
"uri": "https://facebook.com/salahuddin.hairai"
},
"twitter": {
"username": "od3n",
"uri": "https://twitter.com/od3n"
},
"github": {
"username": "od3n",
"uri": "https://github.com/od3n"
},
"telegram": "od3n87"
},
"error": false,
"status": 200
}
- 400 Bad Request
{
"error": true,
"msg": "Invalid name.",
"status": 400
}
{
"error": true,
"msg": "Error occured while trying to save the record.",
"status": 400
}
- 401 Unauthorized
null