Coder Social home page Coder Social logo

hesshub-api's Introduction



HessHub Social Platform API Documentation ๐Ÿ“š

Welcome to the Hesses Social Platform API documentation! This API allows you to interact with various features of the social platform, including user management, hesses, likes, followers, privacy preferences, and more.

Table of Contents ๐Ÿ“‘

Authentication ๐Ÿ”

  • POST /api/auth/login: User login.
  • POST /api/auth/register: User registration.
  • POST /api/auth/forgot-password: Request a password reset email.
  • POST /api/auth/reset-password: Reset password using a token.
  • POST /api/auth/confirm-email: Confirm user's email using a token.

Users ๐Ÿ‘ฅ

  • GET /api/users/:id: Get user details by ID.
  • PUT /api/users/:id: Update user details by ID.
  • DELETE /api/users/:id: Delete a user by ID.

User Profile Images ๐Ÿ–ผ๏ธ

  • GET /api/users/:id/profile-image: Get user's profile image.
  • PUT /api/users/:id/profile-image: Update user's profile image.
  • DELETE /api/users/:id/profile-image: Delete user's profile image.

Following ๐Ÿ‘‚

  • POST /api/users/:id/follow: Request to follow a user.
  • PUT /api/users/:id/follow: Update following preferences for a followed user.
  • DELETE /api/users/:id/follow: Unfollow a user.

Blocking ๐Ÿšซ

  • POST /api/users/:id/block: Block a user.
  • DELETE /api/users/:id/block: Unblock a user.

Follow Requests ๐Ÿค

  • DELETE /api/follow-requests/:id: Cancel a sent follow request.
  • PUT /api/follow-requests/:id/approve: Approve a follow request.
  • PUT /api/follow-requests/:id/reject: Reject a follow request.

Hesses ๐Ÿ—จ๏ธ๐Ÿ

  • POST /api/hesses: Create a new hess.
  • GET /api/hesses/:id: Get hess details by ID.
  • PUT /api/hesses/:id: Update hess details by ID.
  • DELETE /api/hesses/:id: Delete a hess by ID.

Hess Media Upload and Retrieval ๐Ÿ“ท

  • POST /api/hesses/:id/media: Upload media files (images, videos, audio) to an existing hess.
  • GET /api/hesses/:id/media/:id: Get a hess media file by ID(s).
  • DELETE /api/hesses/:id/media/:id: Delete a hess media file by ID(s).

Likes โค๏ธ

  • POST /api/hesses/:id/like: Like a hess.
  • DELETE /api/hesses/:id/like: Unlike a hess.

Feed ๐Ÿ“ฐ

  • GET /api/feed: Get the feed.

Search ๐Ÿ”

  • GET /api/search/hesses: Search for hesses.
  • GET /api/search/users: Search for users.

Privacy Preferences ๐Ÿ”’

  • GET /api/users/:id/privacy: Get user's privacy preferences.
  • PUT /api/users/:id/privacy: Update user's privacy preferences.

Getting Started ๐Ÿš€

To use this API, follow these steps:

  1. Clone this repository to your local machine.

  2. Configure the following environment variables.

    # Database Connection
    DATABASE_URL=<your_database_url>
    
    # JWT Configurations
    JWT_SECRET=<your_jwt_secret>
    JWT_EXPIRE_IN_HOURS=<jwt_expire_time_in_hours>
    
    # Account Activation Configurations
    ACCOUNT_ACTIVATION_LINK_PREFIX=<account_activation_link_prefix>
    ACCOUNT_ACTIVATION_TOKEN_EXPIRE_IN_HOURS=<activation_token_expire_time_in_hours>
    
    # Password Reset Configurations
    PASSWORD_RESET_LINK_PREFIX=<password_reset_link_prefix>
    PASSWORD_RESET_TOKEN_EXPIRE_IN_HOURS=<password_reset_token_expire_time_in_hours>
    
    # Details Included in Emails (you could include only a subset of these)
    FACEBOOK_LINK=<facebook_link>
    TWITTER_LINK=<twitter_link>
    LINKED_IN_LINK=<linkedin_link>
    INSTAGRAM_LINK=<instagram_link>
    FIRST_CONTACT_LINE=<first_contact_line>
    SECOND_CONTACT_LINE=<second_contact_line>
    
  3. Run the application.

  4. Access the API endpoints using the provided routes and methods.

Contributing ๐Ÿค

If you'd like to contribute to this project, feel free to submit pull requests or open issues. Your contributions are greatly appreciated!

License ๐Ÿ“„

This project is licensed under the MIT License.

hesshub-api's People

Contributors

dependabot[bot] avatar louiseyousre 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.