-
Notifications
You must be signed in to change notification settings - Fork 123
/
Cargo.toml
179 lines (148 loc) · 5.14 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
[package]
authors = [
"Ramsay Leung <[email protected]>",
"Mario Ortiz Manero <[email protected]>"
]
name = "rspotify"
version = "0.13.3"
license = "MIT"
readme = "README.md"
description = "Spotify API wrapper"
homepage = "https://github.com/ramsayleung/rspotify"
repository = "https://github.com/ramsayleung/rspotify"
keywords = ["spotify", "api"]
categories = ["api-bindings", "multimedia::audio"]
edition = "2021"
rust-version = "1.56"
[workspace]
members = [
"rspotify-macros",
"rspotify-model",
"rspotify-http"
]
exclude = [
"examples/webapp"
]
[dependencies]
rspotify-macros = { path = "rspotify-macros", version = "0.13.3" }
rspotify-model = { path = "rspotify-model", version = "0.13.3" }
rspotify-http = { path = "rspotify-http", version = "0.13.3", default-features = false }
async-stream = { version = "0.3.2", optional = true }
async-trait = { version = "0.1.51", optional = true }
base64 = "0.22.0"
chrono = { version = "0.4.35", features = ["serde"] }
dotenvy = { version = "0.15.0", optional = true }
futures = { version = "0.3.17", optional = true }
log = "0.4.14"
maybe-async = "0.2.6"
serde = { version = "1.0.130", default-features = false }
serde_json = "1.0.67"
sha2 = "0.10.0"
thiserror = "1.0.29"
url = "2.2.2"
webbrowser = { version = "1.0.0", optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2.3", features = ["js"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
getrandom = "0.2.3"
[dev-dependencies]
env_logger = { version = "0.11.0", default-features = false }
futures-util = "0.3.17"
wasm-bindgen-test = "0.3.34"
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
tokio = { version = "1.11.0", features = ["rt-multi-thread", "macros"] }
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
tokio = { version = "1.11.0", features = ["rt", "macros"] }
dotenvy_macro = { version = "0.15.7" }
[features]
default = ["client-reqwest", "reqwest-default-tls"]
### Client ###
cli = ["webbrowser"]
env-file = ["dotenvy"]
### HTTP ###
# Available clients. By default they don't include a TLS so that it can be
# configured.
client-ureq = ["rspotify-http/client-ureq", "__sync"]
client-reqwest = ["rspotify-http/client-reqwest", "__async"]
# Passing the TLS features to reqwest.
reqwest-default-tls = ["rspotify-http/reqwest-default-tls"]
reqwest-rustls-tls = ["rspotify-http/reqwest-rustls-tls"]
reqwest-native-tls = ["rspotify-http/reqwest-native-tls"]
reqwest-native-tls-vendored = ["rspotify-http/reqwest-native-tls-vendored"]
# Same for ureq.
ureq-rustls-tls = ["rspotify-http/ureq-rustls-tls"]
ureq-rustls-tls-native-certs = ["rspotify-http/ureq-rustls-tls-native-certs"]
ureq-native-tls = ["rspotify-http/ureq-native-tls"]
# Internal features for checking async or sync compilation
__async = ["futures", "async-stream", "async-trait"]
__sync = ["maybe-async/is_sync"]
[package.metadata.docs.rs]
# When generating the docs, we also want to include the CLI methods, and working
# links for `dotenvy`. We generate them for ureq so that the function signatures
# of the endpoints don't look gnarly (because of `async-trait`).
features = ["cli", "env-file", "client-ureq"]
no-default-features = true
[[example]]
name = "client_creds"
required-features = ["env-file", "client-reqwest"]
path = "examples/client_creds.rs"
[[example]]
name = "auth_code"
required-features = ["env-file", "cli", "client-reqwest"]
path = "examples/auth_code.rs"
[[example]]
name = "auth_code_pkce"
required-features = ["env-file", "cli", "client-reqwest"]
path = "examples/auth_code_pkce.rs"
[[example]]
name = "oauth_tokens"
required-features = ["env-file", "cli", "client-reqwest"]
path = "examples/oauth_tokens.rs"
[[example]]
name = "with_refresh_token"
required-features = ["env-file", "cli", "client-reqwest"]
path = "examples/with_refresh_token.rs"
[[example]]
name = "with_auto_reauth"
required-features = ["env-file", "cli", "client-reqwest"]
path = "examples/with_auto_reauth.rs"
[[example]]
name = "with_token_callback_fn"
required-features = ["env-file", "cli", "client-reqwest"]
path = "examples/with_token_callback_fn.rs"
[[example]]
name = "device"
required-features = ["env-file", "cli", "client-ureq"]
path = "examples/ureq/device.rs"
[[example]]
name = "me"
required-features = ["env-file", "cli", "client-ureq"]
path = "examples/ureq/me.rs"
[[example]]
name = "search"
required-features = ["env-file", "client-ureq"]
path = "examples/ureq/search.rs"
[[example]]
name = "seek_track"
required-features = ["env-file", "cli", "client-ureq"]
path = "examples/ureq/seek_track.rs"
[[example]]
name = "threading"
required-features = ["env-file", "client-ureq"]
path = "examples/ureq/threading.rs"
[[example]]
name = "tasks"
required-features = ["env-file", "client-reqwest"]
path = "examples/tasks.rs"
[[example]]
name = "pagination_manual"
required-features = ["env-file", "cli", "client-reqwest"]
path = "examples/pagination_manual.rs"
[[example]]
name = "pagination_sync"
required-features = ["env-file", "cli", "client-ureq"]
path = "examples/pagination_sync.rs"
[[example]]
name = "pagination_async"
required-features = ["env-file", "cli", "client-reqwest"]
path = "examples/pagination_async.rs"