Giter Site home page Giter Site logo

playsee_pre_work_2022's Introduction

Welcome this is your Quiz guide

------ ------ ------ ------ PROFILE ------ ------ ------ ------

this quiz example router is /profile/!1NMGhCcD3!

  1. url: ${current url}/profile/${profileId}.
  2. Refer to API ๏ผ† Resources, fetch API.
  3. Watch design and implement RWD. Porofile
  4. You can use /util/numberFormat to convert number to format string. (ex: 1000 => 1k)
  5. Implement infinite scrolling for post list, like this:
    • You will take token to get the next post list.
    • You can use component of spinner in /component/block/spinner.
    • Maybe Intersection Observer API will help you.
  6. There are some component is available to use.

API

1. PROFILE_HOST_API

Request info:

POST {base_url}/web5.0.0/post/get_user_post_list

BaseUrl

Name Url
base_url https://srv2api-dev-v2-framy-stage.uc.app.playsee.co

Header

Name Type Description
Authorization string You can get PROFILE_HOST_ENDPOINT in /asset/constant.

Body

Name Required Type
user_id V string

Example

curl --request POST \
  --url 'https://srv2api-dev-v2-framy-stage.uc.app.playsee.co/web5.0.0/users/get_user_profile' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: ad52e3866ee135ff5d92545349414868#0#web' \
  --data '{
	"user_id": "!1NMGhCcD3!"
}'

Response info:

  • userId: data.user.user_id string
  • userName: data.user.name string
  • uid: data.user.uid string
  • level: data.user.level number
  • followers: data.count.follower number
  • following: data.count.following + data.count.following_hashtag + data.count.following_location number
  • videos: data.count.post number
  • description: data.profile.public_info.about string

2. PROFILE_LIST_HOST_API

Request info:

POST {base_url}/web5.0.0/post/get_user_post_list

BaseUrl

Name Url
base_url https://srv2api-dev-v2-framy-stage.uc.app.playsee.co

Header

Name Type Description
Authorization string You can get PROFILE_HOST_ENDPOINT in /asset/constant.

Body

Name Required Type
user_id V string
page_token X string

Example

curl --request POST \
  --url 'https://srv2api-dev-v2-framy-stage.uc.app.playsee.co/web5.0.0/post/get_user_post_list' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: ad52e3866ee135ff5d92545349414868#0#web' \
  --data '{
    "user_id": "!1NMGhCcD3!",
    "page_token": ""
}'

Response info:

  • pageToken: data.page_token string (you will use this to fetch next post list, if token is "NO_MORE_DATA" means no data more)
  • postList: data.post_list array
  • coverUrl: data.post_list[index].display_resources.cover_url string
  • locationName: data.post_list[index].geo.poi.name string

Resources

userAvatar -> https://g-usr.playsee.co/headshot/{userId}.jpg videoThumbnail -> data.post_list[index].display_resources.cover_url

playsee_pre_work_2022's People

Contributors

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