Git Product home page Git Product logo

forum_server_asp's Introduction

ForumAPI

Description

ForumAPI is a RESTful API built with ASP.NET Core that allows users to create, read, update, and delete categories, sections, subjects, and messages.

Installation

  1. Clone the repository: git clone [email protected]:RomainNeup/forum_server_asp.git
  2. Navigate to the project directory: cd ForumAPI**
  3. Restore the dependencies: dotnet restore**
  4. Build the project: dotnet build**
  5. Run the project: dotnet run**

Forum API Routes

Auth Routes


๐Ÿ”“ POST /auth/register

Registers a new user account.

๐Ÿ“„ Payload:

{
    "username": "string",
    "email": "string",
    "password": "string"
}

๐Ÿ”“ POST /auth/login

Logs in a user and returns an authentication token.

๐Ÿ“„ Payload:

{
    "email": "string",
    "password": "string"
}

Category Routes


๐Ÿ” POST /categories

Creates a new category.

๐Ÿ“„ Payload:

{
    "name": "string",
    "description": "string"
}

๐Ÿ”“ GET /categories

Returns a list of all categories.


๐Ÿ”“ GET /categories/{id}

Returns the details of a single category.


๐Ÿ” PUT /categories/{id}

Updates an existing category.

๐Ÿ“„ Payload:

{
    "name": "string",
    "description": "string"
}

๐Ÿ” DELETE /categories/{id}

Deletes an existing category.

Section Routes


๐Ÿ” POST /sections

Creates a new section in the specified category.

๐Ÿ“„ Payload:

{
    "name": "string",
    "description": "string",
    "categoryId": "integer"
}

๐Ÿ”“ GET /sections

Returns a list of all sections.


๐Ÿ”“ GET /sections/{id}

Returns the details of a single section.


๐Ÿ” PUT /sections/{id}

Updates an existing section.

๐Ÿ“„ Payload:

{
    "name": "string",
    "description": "string"
}

๐Ÿ” DELETE /sections/{id}

Deletes an existing section.

Subject Routes


๐Ÿ” POST /sections/{sectionId}/subjects

Creates a new subject in the specified section.

๐Ÿ“„ Payload:

{
    "name": "string",
    "text": "string"
}

๐Ÿ”“ GET /sections/{sectionId}/subjects

Returns a list of all subjects in the specified section.


๐Ÿ”“ GET /sections/{sectionId}/subjects/{id}

Returns the details of a single subject.


๐Ÿ” PUT /sections/{sectionId}/subjects/{id}

Updates an existing subject.

๐Ÿ“„ Payload:

{
    "name": "string",
    "text": "string"
}

๐Ÿ” DELETE /sections/{sectionId}/subjects/{id}

Deletes an existing subject.

Message Routes


๐Ÿ” POST /subjects/{subjectId}/messages

Creates a new message in the specified subject.

๐Ÿ“„ Payload:

{
    "text": "string"
}

๐Ÿ”“ GET /subjects/{subjectId}/messages

Returns a list of all messages in the specified subject.


๐Ÿ”“ GET /subjects/{subjectId}/messages/{id}

Returns the details of a single message.


๐Ÿ” PUT /subjects/{subjectId}/messages/{id}

Updates an existing message.

๐Ÿ“„ Payload:

{
    "text": "string"
}

๐Ÿ” DELETE /subjects/{subjectId}/messages/{id}

Deletes an existing message.


Note: ๐Ÿ” represents a protected route, which requires a JWT token to be sent in the request header as Bearer token, while ๐Ÿ”“ represents an unprotected route.

forum_server_asp's People

Contributors

romainneup avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.