Skip to content

this create a crud with serverless framework to deploy in AWS and integrate SWAPI, this is a STARWARS' API

Notifications You must be signed in to change notification settings

JuniorAlmeyda/serverless_framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SRC FILE

You can find the code in the src file. In the AWS file you can find all logic about a little CRUD using SERVERLESS FRAMEWORK. On the other hand, in the SWAPI file, you can find the logic about the integration with SWAPI API, you can only see one endpoint requesting information about a person. Finally, in the helpers file, you can find a dictionary that it's used to translate from English to Espanish the properties from the SWAPI'S Object


ENDPOINTS

You have to know this concepts

  1. BASE_URL: https://34kpi5hsce.execute-api.us-west-2.amazonaws.com
  2. ID_SWAPI: this is the person's id from SWAPI API
  3. UID: this is a unique id of a user in DynamoDB

To request information about a person using SWAPI API, the route is: BASE_URL/getPersonFromSWAPI/ID_SWAPI the method for this route is GET

To create a User and save this information in DynamoDB, the route is: BASE_URL/createUser the method for this route is POST and you have to send a body, similar like this:

{
  "name": "name_value",
  "lastName": "lastName_value",
  "dni": "dni_value"
}

To get all users from DynamoDB, the route is: _BASE_URL/getUsers the method for this route is GET

To get a user by id from DynamoDB, the route is: BASE_URL/getUser/UID_ the method for this route is GET

To update user's information by id from DynamoDB, the route is: _BASE_URL/updateUser/UID the method for this route is PUT

To delete user's information by id from DynamoDB, the route is: BASE_URL/deleteUser/UID the method for this route is DELETE

About

this create a crud with serverless framework to deploy in AWS and integrate SWAPI, this is a STARWARS' API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published