Giter VIP home page Giter VIP logo

nisi-django's Introduction

Nisi (Backend Django API REST Framework)

Endpoints

GET Facebook followings

  • Enpoint fd/fbfollowings/
  • input
 None
  • output
 DEFAULT

GET Notifications

  • Endpoint fd/notifications/
  • input
     None
    
  • output
      [
        {
          type: NOTIFICATION_TYPE,
          username: "author of the notification."
          post: "id of post related with the notification."
          content: {
            _comment: "Aditional information about the notification."
          }
        }
      ]

GET Near users

  • Endpoint map/nearusers/', map_views.near_users),
  • input
     None
    
  • output
    [
      {
        username: "Username of the user who is near.",
        picture_path: "Profile picture path.",
        rating: rating,
        followed: "true if user is following the user."
      }
    ]

POST Update location

  • Endpoint map/updatelocation
  • input
    {
      position: {
        lat: latitude,
        lng: longitude
      }
    }
  • output
     DEFAULT
    

POST Follow somebody

  • Endpoint net/follow
  • input
    {
      username: "Username of the user who will be followed."
    }
  • output
     DEFAULT
    

POST Rate somebody

  • Endpoint net/rate/
  • input
    {
      rating: rating
    }
  • output
     DEFAULT
    

GET Somebody's public profile.

  • Endpoint net/profile/
  • input
    {
      username: "Username with the requested profile."
    }
  • output
      {
        rating: rating,
        about: "About, given by the username",
        followers: number_of_followers,
        followings: number_of_follings,
        statistics:{
          antiquity: "Number of years/months/days",
          rated: total_of_rated_people,
          rated_me: total_of_people_who_rated
        },
        sns:{
            fb: "Facebook username.",
            tw: "Twitter username.",
            ig: "Instagram username.",
            tg: "Telegram username."
        },
        posts: [
          {
            post: Post
          }
        ]
      }

GET My profile

  • Endpoint nu/profile/
  • input
     None
    
  • output
    {
      username: "username",
      rating: rating,
      about: "About, given by the username",
      followers: number_of_followers,
      followings: number_of_follings,
      sns:{
          fb: {
            username: "Facebook username",
            state: SN_STATE
          },
          tw: {
            username: "Twitter username",
            state: SN_STATE
          },
          ig: {
            username: "Instagram username",
            state: SN_STATE
          },
          tg: {
            username: "Telegram username",
            state: SN_STATE
          },
      },
      statistics:{
        antiquity: "Number of years/months/days",
        rated: total_of_rated_people,
        rated_me: total_of_people_who_rated
      },
    
    }

POST Sign up

  • Endpoint nu/signup/
  • input
    {
      username: "username which will be registered.",
      password: "password.",
      phone: "phone number",
      picture: File
    }
  • output
     HTTP 201 if created.
    

POST Sign in

  • Endpoint nu/signin/
  • input
    {
      username: "username",
      password: "password"
    }
  • output
     DEFAULT
    

POST Add social network

  • Endpoint nu/addsn/
  • input
    {
      sn:{
        code: SN_CODE,
        username: "Username in the social network."
      }
    }
  • output
     DEFAULT
    

More

DEFAULT

  • HTTP200 if okay.
  • HTTP40x is client error.
  • HTTP50x if server error.

NOTIFICATION_TYPE

  • 0: Nisi info.
  • 1: username is following me.
  • 2: username has rated me.
  • 3: username has commented a post.

SN_CODE

  • "tg": "Telegram"
  • "tw": "Twitter"
  • "ig": "Instagram"
  • "fb": "Facebook"

SN_STATE

  • 0: Is not added
  • 1: Verified
  • 2: In process
  • -1: Error

nisi-django's People

Contributors

valentinafeve avatar

Stargazers

 avatar

Watchers

James Cloos avatar  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.