didicarpool

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 7 Imported by: 1

README

didicarpool

Get didi's car pool orders (滴滴顺风车订单).

To obtain DIDITOKEN, launch mitmproxy, set up phone's proxy and certificate settings, launch the didi app on your phone, open the car pool home page, find request whose URL starts with https://api.didialift.com, select that request, and get the value of the cookie "ntoken".

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Token string
}

func (Client) GetOrders

func (client Client) GetOrders(ctx context.Context, month string) (*Orders, error)

Get list of orders in month. To get orders of current month, set month to empty. For other month, use yyyyMM format.

type Location

type Location struct {
	Name string
	Lat  string
	Lon  string
}

type Order

type Order struct {
	Id              string
	Exclusive       bool
	TotalPassengers int
	TotalAmount     string
	Routes          []Route
}

type Orders

type Orders struct {
	Orders    []Order
	NextMonth string
}

type Route

type Route struct {
	Id         string
	UserId     string
	CreatedAt  time.Time
	StartedAt  time.Time
	From       Location
	To         Location
	Passengers int
	Amount     string
}

Directories

Path Synopsis
cmd
didicarpool module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL