You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/lCanSay/avatarApi

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/lCanSay/avatarApi

v0.0.0-20240517091759-7ff9adea13d3
Source
Go
Version published
Created
Source

Golang-Application-Project

The project is based on Avatar: Aang cartoon-serial.

/users method POST

/users/{userld:[0-9]+} method GET

/users/{userld:[0-9]+} method PUT

/users/{userld:[0-9]+} method DELETE

Postgres DB structers

Tables

characters

The characters table contains the following columns:

Column NameData TypeDescription
idINTPrimary key, unique identifier for each character.
nameVARCHARThe name of the character.
descriptionTEXTA detailed description of the character.
ageINTThe age of the character.
affiliation_idINTForeign key linking to the affiliation table.
created_atTIMESTAMPTimestamp when the character was created.
updated_atTIMESTAMPTimestamp when the character was last updated.

affiliation

The affiliation table contains the following columns:

Column NameData TypeDescription
idINTPrimary key, unique identifier for each affiliation.
nameVARCHARThe name of the affiliation.
descriptionTEXTA detailed description of the affiliation.
created_atTIMESTAMPTimestamp when the affiliation was created.
updated_atTIMESTAMPTimestamp when the affiliation was last updated.

ability

The ability table contains the following columns:

Column NameData TypeDescription
idINTPrimary key, unique identifier for each ability.
nameVARCHARThe name of the ability.
descriptionTEXTA detailed description of the ability.
created_atTIMESTAMPTimestamp when the ability was created.
updated_atTIMESTAMPTimestamp when the ability was last updated.

Relationships

  • The characters table may have a foreign key affiliation_id that relates to the affiliation table, indicating the location affiliation of a character.

  • If characters have specific bending abilities listed in the ability column, you might consider creating a separate table for abilities and establishing a many-to-many relationship between characters and ability.

API Endpoints

Base URL

The base URL for all API endpoints is https://your-api-domain.com.

Characters

  • Get All Characters: /characters (GET)
  • Get Character by ID: /characters/{id} (GET)
  • Create a New Character: /characters (POST)
  • Update a Character: /characters/{id} (PUT)
  • Delete a Character: /characters/{id} (DELETE)

Permissions

Certain endpoints require specific permissions to be accessed:

  • POST /characters: Requires characters:read permission.
  • PUT /characters/{id}: Requires characters:write permission.
  • DELETE /characters/{id}: Requires characters:write permission.

GET /api/characters

Get a list of all characters.

Response: [ { "id": 1, "name": "Aang", "age": 112, "gender": "Male", "affiliation": "Air Nomads", "abilities": "Airbending, Energybending", "image": "https://example.com/aang.jpg" }, // ... other characters ]

GET /api/characters

Affiliation

  • Get All Affiliations: /affiliations (GET)
  • Get Affiliation by ID: /affiliations/{id} (GET)
  • Create a New Affiliation: /affiliations (POST)
  • Update an Affiliation: `/affiliations

FAQs

Package last updated on 17 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.