Skip to content

AleksandrGavrilin/referralsystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Referral system (with interface for testing).

Key Features:

- authorization by phone number;
- record a new user in the database;
- assigning a generated code to a new user;
- the ability to track in the profile the number of users who entered the invite code of the current user.

Description of main functions (in the "views" file):

The function "phone_auth" sending an authorization code, adding a user (phone number) to the database.
Below are the main parameters:

Endpoint: api/phone_auth
method: GET
params: phonenumber
answer: OK, error(403)

The function "phone_code" sending an invite code, adding a user (phone number, invitation code) to the "User" database.
Below are the main parameters:

Endpoint: api/phone_code
method: GET
params: phonenumber, phonecode
answer: OK/JSON(referralcode), error(403)

The function "invite" processes the received invite code.
Below are the main parameters:

Endpoint: api/invite
method: GET
params: phonenumber, usercode, invitecode
answer: OK, error(401)

The function "getreferrals" provides a list of invited users.
Below are the main parameters:

Endpoint: api/getreferrals
method: GET
params: phonenumber, usercode
answer: OK/JSON(phonelist), error(401)

System testing.

To test the system, run the file "testapi.py" and follow the instructions.

About

System for sending invite codes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages