Sen descrición

jack cd44401322 update hai 2 meses
api cd44401322 update hai 2 meses
hack 89d9807ee5 first commit hai 2 meses
internal cd44401322 update hai 2 meses
manifest 89d9807ee5 first commit hai 2 meses
resource 89d9807ee5 first commit hai 2 meses
utility 89d9807ee5 first commit hai 2 meses
.gitattributes 89d9807ee5 first commit hai 2 meses
.gitignore 89d9807ee5 first commit hai 2 meses
Makefile 89d9807ee5 first commit hai 2 meses
README.MD cd44401322 update hai 2 meses
go.mod 89d9807ee5 first commit hai 2 meses
go.sum 89d9807ee5 first commit hai 2 meses
main.go 89d9807ee5 first commit hai 2 meses

README.MD

GoFrame Template For SingleRepo

Quick Start:

register

curl -X POST http://127.0.0.1:8000/v1/users/register -H "Content-Type: application/json" -d "{\"username\":\"jiege66666\", \"password\":\"123456\", \"email\":\"admin@163.com\"}"

login

curl -X POST http://127.0.0.1:8000/v1/users/login -H "Content-Type: application/json" -d "{\"username\":\"jiege66666\", \"password\":\"123456\"}"

get user info

curl -H "Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6NiwiVXNlcm5hbWUiOiJqaWVnZTY2NjY2IiwiZXhwIjoxNzYwMzQyNjkzfQ.ULS-Vy5GNnU6xjbayIr7mXJqjxqzgGqBFjrrj9kOB5w" http://127.0.0.1:8000/v1/account/info

create words

curl -X POST http://127.0.0.1:8000/v1/words

 -H "Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6NiwiVXNlcm5hbWUiOiJqaWVnZTY2NjY2IiwiZXhwIjoxNzYwMzQyNjkzfQ.ULS-Vy5GNnU6xjbayIr7mXJqjxqzgGqBFjrrj9kOB5w" \
 -H "Content-Type: application/json" \
 -d '{
       "word": "example",
       "definition": "A representative form or pattern.",
       "example_sentence": "This is an example sentence.",
       "chinese_translation": "例子",
       "pronunciation": "ɪɡˈzɑːmp(ə)l",
       "proficiency_level": 3
     }'

update words

curl -X PUT http://127.0.0.1:8000/v1/words/1

 -H "Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6NiwiVXNlcm5hbWUiOiJqaWVnZTY2NjY2IiwiZXhwIjoxNzYwMzQyNjkzfQ.ULS-Vy5GNnU6xjbayIr7mXJqjxqzgGqBFjrrj9kOB5w" \
 -H "Content-Type: application/json" \
 -d '{
       "word": "example_update",
       "definition": "A representative form or pattern.",
       "example_sentence": "This is an example sentence.",
       "chinese_translation": "例子2",
       "pronunciation": "ɪɡˈzɑːmp(ə)l",
       "proficiency_level": 3
     }'

words page

curl -X GET http://127.0.0.1:8000/v1/words

 -H "Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6NiwiVXNlcm5hbWUiOiJqaWVnZTY2NjY2IiwiZXhwIjoxNzYwMzQyNjkzfQ.ULS-Vy5GNnU6xjbayIr7mXJqjxqzgGqBFjrrj9kOB5w" \
 -H "Content-Type: application/json"

words detail

curl -X GET http://127.0.0.1:8000/v1/words/1

 -H "Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6NiwiVXNlcm5hbWUiOiJqaWVnZTY2NjY2IiwiZXhwIjoxNzYwMzQyNjkzfQ.ULS-Vy5GNnU6xjbayIr7mXJqjxqzgGqBFjrrj9kOB5w" \
 -H "Content-Type: application/json"

words delete

curl -X DELETE http://127.0.0.1:8000/v1/words/1

 -H "Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6NiwiVXNlcm5hbWUiOiJqaWVnZTY2NjY2IiwiZXhwIjoxNzYwMzQyNjkzfQ.ULS-Vy5GNnU6xjbayIr7mXJqjxqzgGqBFjrrj9kOB5w" \
 -H "Content-Type: application/json"

words rand

curl -X GET http://127.0.0.1:8000/v1/words/rand

 -H "Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6NiwiVXNlcm5hbWUiOiJqaWVnZTY2NjY2IiwiZXhwIjoxNzYwMzQyNjkzfQ.ULS-Vy5GNnU6xjbayIr7mXJqjxqzgGqBFjrrj9kOB5w" \
 -H "Content-Type: application/json"

--

curl -X PATCH http://127.0.0.1:8000/v1/words/1/level

 -H "Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6NiwiVXNlcm5hbWUiOiJqaWVnZTY2NjY2IiwiZXhwIjoxNzYwMzQyNjkzfQ.ULS-Vy5GNnU6xjbayIr7mXJqjxqzgGqBFjrrj9kOB5w" \
 -H "Content-Type: application/json" \
 -d '{
       "level": 5
     }'