Giter Club home page Giter Club logo

wall's Introduction

Wall: A very lean social media API

travisci

An extremely lean and basic social media REST API built with Django and Django-REST-Framework (DRF) that allows users to register for accounts, create posts, comment on posts and pin (like) other posts to the wall. Authentication is done using SimpleJWT. Testing implemented with django-nose and coverage (see coverage report below).

Project Goals:

  • Complete a project with Django and Django-REST-Framework
  • Implement a test driven approach for developing a REST API
  • Use Travis-CI to run automated tests when committing new code
  • Learn class based and generic views in Django and DRF

REST Endpoints

  • GET -> /posts/ -> returns current users posts (auth required)
  • POST -> /posts/ -> create new post (auth required)
  • GET -> /posts/<uuid>/ -> return post details
  • PUT -> /posts/<uuid>/ -> make an edit to the post text (author only)
  • DELETE -> /posts/<uuid>/ -> delete post (author only)
  • PUT -> /posts/<uuid>/pin/ -> increment post pins by 1 (auth required)
  • GET -> /posts/<uuid>/comments/ -> returns all comments for post with uuid
  • POST -> /posts/<uuid>/comments/ -> create new comment on post with uuid (auth required)
  • GET -> /posts/<post_uuid>/comments/<comment_uuid>/ -> comment details
  • DELETE -> /posts/<post_uuid>/comments/<comment_uuid>/ -> delete comment (author only)

View the users urls.py file for the user account endpoints.

Coverage Report

Name                   Stmts   Miss  Cover
------------------------------------------
posts/permissions.py       6      0   100%
posts/serializers.py      17      0   100%
posts/views.py            45      0   100%
users/managers.py         18      7    61%
users/serializers.py      23      0   100%
users/views.py            32      2    94%
------------------------------------------
TOTAL                    141      9    94%
----------------------------------------------------------------------
Ran 40 tests in 6.803s

OK

Written by Nicholas Cannon

wall's People

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.