https://github.com/la3rence/go-eudic
[WIP] EUDIC 欧路词典背单词 SDK. It only supports reciting API.
https://github.com/la3rence/go-eudic
eudic golang sdk
Last synced: about 1 year ago
JSON representation
[WIP] EUDIC 欧路词典背单词 SDK. It only supports reciting API.
- Host: GitHub
- URL: https://github.com/la3rence/go-eudic
- Owner: la3rence
- License: mit
- Created: 2021-04-07T06:29:15.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-01-15T10:42:26.000Z (over 2 years ago)
- Last Synced: 2025-03-27T20:14:02.684Z (over 1 year ago)
- Topics: eudic, golang, sdk
- Language: Go
- Homepage:
- Size: 34.2 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/Lonor/go-eudic/actions/workflows/ci.yaml)
# EUDIC SDK for Go
## HTTP REST endpoints
This SDK only supports for the part of reciting with the API host: `https://api.frdic.com`, includes:
```
POST /api/v2/auth/authorize
POST /route/recite/checkin
POST /route/recite/getcheckininfo
POST /route/recite/getlastbook
POST /route/recite/answercard
POST /route/recite/startrecite
POST /route/recite/syncrecite
POST /route/recite/getuserinfo
```
General HTTP Headers:
- Content-Type: application/json;charset=utf-8
- User-Agent: /eusoft_eudic_en_mac/4.0.2/A4:83:E7:90:13:5D/explain/
```shell
export EUDIC_USERNAME="change me"
export EUDIC_PASSWORD="change me"
go test ./...
```
## Usage
```shell
go get -u github.com/Lonor/go-eudic
```
```go
package main
import (
eudic "github.com/Lonor/go-eudic"
)
func main() {
client, _ := eudic.NewEudicClientByPassword(
"mail address",
"your password",
)
book, _, _ := client.LastBookService.GetLastBook()
}
```
## LICENSE
This project is under the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.html).