GithubHelp home page GithubHelp logo

antisocial-network-api's Introduction

Antisocial Network API

Hippocratic License HL3-FULL

An api for a hypothetical social network built with MongoDB and Mongoose.


Table of Contents


Installation

You'll need Node.js, npm, and MongoDB to be installed before you begin. Clone this repo. From your command line, go to the repo directory and run npm install.

With that out of the way, you can run npm start to start the server.

Usage

You can hit the endpoints to perform CRUD actions for users, thoughts, and reactions.

Users

Endpoint: /api/users

  • GET all users
  • POST a new user:
{
   "username": "kramer",
   "email": "[email protected]"
}

Endpoint: /api/users/userID

  • GET a single user
  • DELETE a single user AND all associated thoughts
  • PUT update a user with a new username or email:
{
   "email": "[email protected]"
}

Endpoint: /api/users/userID/friends/friendID

  • POST add a new friend to a user's friend list
  • DELETE remove a friend from a user's friend list

Thoughts & Reactions

Endpoint: /api/thoughts

GET get all thoughts

POST create a new thought:

{
	"username": "newman",
	"thoughtText": "Hello, Jerry."
}

Endpoint: /api/thoughts/thoughtID

  • GET a single thought
  • PUT update a thought's thoughtText:
{
	"thoughtText": "Hello, ~Jerry~"
}
  • DELETE remove a thought

Endpoint: /api/thoughts/thoughtID/reactions

  • POST creates a reaction to a thought and stores it in the parent thought's reactions array
  • DELETE removes a reaction by its reactionId:
{
	"reactionId": "62fec182d2e24bc9bbd6ab5d"
}

Demo video

antisocial-network-api-demo.mp4

License

This project uses the Hippocratic License, v3.0. TL;DR, it's not quite open source, but as long as you're not violating human rights, being a fossil fuel company, conducting military operations, etc (see license for full details), you can essentially treat it as open source.

Questions?

Contact lshillman via methods described at lukehillman.net.

antisocial-network-api's People

Contributors

lshillman 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.