-
Notifications
You must be signed in to change notification settings - Fork 0
/
option.go
57 lines (49 loc) · 1.05 KB
/
option.go
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
package vk_sdk
import "strconv"
// Option is structure for optional method fields.
type Option struct {
name string
value string
}
type Language int
const (
Russian Language = 0
Ukrainian Language = 1
Belorussian Language = 2
English Language = 3
Spanish Language = 4
Finnish Language = 5
Deutsch Language = 6
Italian Language = 7
)
// Lang determines the Language for the data to be displayed on.
// For example country and city names.
// Numeric format from VK.Account_GetInfo is supported as well.
func Lang(l Language) Option {
return Option{
name: "lang",
value: strconv.Itoa(int(l)),
}
}
// TestMode allows you to execute queries from a native application
// without enabling it for all users.
func TestMode() Option {
return Option{
name: "test_mode",
value: "1",
}
}
// CaptchaSID received ID.
func CaptchaSID(sid string) Option {
return Option{
name: "captcha_sid",
value: sid,
}
}
// CaptchaKey text input.
func CaptchaKey(key string) Option {
return Option{
name: "captcha_key",
value: key,
}
}