Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User API #1

Closed
17 of 19 tasks
amirrustam opened this issue Jan 6, 2020 · 0 comments · Fixed by #13
Closed
17 of 19 tasks

User API #1

amirrustam opened this issue Jan 6, 2020 · 0 comments · Fixed by #13
Assignees
Labels

Comments

@amirrustam
Copy link
Contributor

amirrustam commented Jan 6, 2020

Data Model


  • id | string
  • uuid | string
  • first_name | string
  • last_name | string
  • username | string (unique, url-friendly and santized)
  • password | string (bcrypt encrypted text)
  • email | string (unique, email-format)
  • phone_number | string (unique, phone-format)
  • balance | positive-number
  • avatar | string (url-fromat)
  • default_privacy_level | string enumerated: "public" | "private" | "contacts" (default)
  • created_at | timestamp (ISO 8601)
  • modified_at | timestamp (ISO 8601)

HTTP API


  • GET /users

    • Validate params
    • Tested
    • Query Params:
      • Validate params
      • order
        • default: scoped user contacts first, then all other users
        • "top_first": contacts with most transactions first
  • GET /users/:user_id (permission: account owner)

    • Validate params
    • Tested
  • GET /users/profile/:username (public info, authentication not required)

    • Tested
  • GET /users/search

    • Validate params
    • Tested
    • Query Params:
      • Validate params
      • query: string representing like name or like username, or exactly phone, or exactly email
  • POST /users

    • Validate payload
    • Tested
  • PATCH /users/:user_id

    • Validate params
    • Tested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants