forked from archived-shomeya/box_api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbox_api.install
More file actions
92 lines (86 loc) · 2.51 KB
/
box_api.install
File metadata and controls
92 lines (86 loc) · 2.51 KB
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
<?php
/**
* @file
* Schema and installation functions for box_api module.
*/
function box_api_schema() {
$schema = array();
$schema['box_api_creds'] = array(
'description' => 'Store credentials for box API',
'fields' => array(
'id' => array(
'description' => 'Serial ID.',
'type' => 'serial',
'unsighed' => TRUE,
'not null' => TRUE,
),
'id_key' => array(
'description' => 'Key that another module may use to access/store creds.',
'type' => 'varchar',
'length' => '64',
'not null' => TRUE,
'default' => '',
),
'token' => array(
'description' => 'Token used to identify creds during OAUTH dance.',
'type' => 'varchar',
'length' => '128',
'not null' => FALSE,
),
'client_id' => array(
'description' => 'Client ID key',
'type' => 'varchar',
'length' => '64',
'not null' => FALSE,
),
'client_secret' => array(
'description' => 'Client secret',
'type' => 'varchar',
'length' => '64',
'not null' => FALSE,
),
'timestamp' => array(
'description' => 'Time that access and refresh tokens were generated.',
'type' => 'int',
'not null' => FALSE,
),
'expires' => array(
'description' => 'Length of time in seconds until access token expires.',
'type' => 'int',
'not null' => FALSE,
),
'access_token' => array(
'description' => 'The access token used to authorize API requests.',
'type' => 'varchar',
'length' => '64',
'not null' => FALSE,
),
'refresh_token' => array(
'description' => 'The refresh token used to generate a new access token.',
'type' => 'varchar',
'length' => '128',
'not null' => FALSE,
),
'token_status' => array(
'description' => 'The status of the access token for this set of creds.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'options' => array(
'description' => 'Options array for creating this set of creds.',
'type' => 'blob',
'not null' => FALSE,
'size' => 'big',
'serialize' => TRUE,
),
),
'primary key' => array('id'),
'indexes' => array(
'id_key' => array('id_key'),
'token' => array('token'),
),
);
$schema['cache_box_object'] = drupal_get_schema_unprocessed('system', 'cache');
return $schema;
}