|
1 | 1 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
2 | 2 |
|
| 3 | +/* |
| 4 | +|-------------------------------------------------------------------------- |
| 5 | +| REST Format |
| 6 | +|-------------------------------------------------------------------------- |
| 7 | +| |
| 8 | +| What format should the data be returned in by default? |
| 9 | +| |
| 10 | +| Default: xml |
| 11 | +| |
| 12 | +*/ |
| 13 | +$config['rest_default_format'] = 'xml'; |
| 14 | + |
3 | 15 | /* |
4 | 16 | |-------------------------------------------------------------------------- |
5 | 17 | | REST Realm |
|
58 | 70 | | If no key is provided, the request will return an error. |
59 | 71 | | |
60 | 72 | | FALSE |
| 73 | +
|
| 74 | + CREATE TABLE `keys` ( |
| 75 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 76 | + `key` varchar(40) NOT NULL, |
| 77 | + `level` int(2) NOT NULL, |
| 78 | + `ignore_limits` tinyint(1) NOT NULL DEFAULT '0', |
| 79 | + `date_created` int(11) NOT NULL, |
| 80 | + PRIMARY KEY (`id`) |
| 81 | + ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
61 | 82 | | |
62 | 83 | */ |
63 | | -$config['rest_enable_keys'] = TRUE; |
| 84 | +$config['rest_enable_keys'] = FALSE; |
64 | 85 |
|
65 | 86 | /* |
66 | 87 | |-------------------------------------------------------------------------- |
|
94 | 115 | |-------------------------------------------------------------------------- |
95 | 116 | | |
96 | 117 | | When set to true REST_Controller will log actions based on key, date, |
97 | | -| time and IP address. |
| 118 | +| time and IP address. This is a general rule that can be overridden in the |
| 119 | +| $this->method array in each controller. |
| 120 | +| |
| 121 | +| FALSE |
| 122 | +| |
| 123 | + CREATE TABLE `logs` ( |
| 124 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 125 | + `uri` varchar(255) NOT NULL, |
| 126 | + `method` varchar(6) NOT NULL, |
| 127 | + `params` text NOT NULL, |
| 128 | + `api_key` varchar(40) NOT NULL, |
| 129 | + `ip_address` varchar(15) NOT NULL, |
| 130 | + `time` int(11) NOT NULL, |
| 131 | + `authorized` tinyint(1) NOT NULL, |
| 132 | + PRIMARY KEY (`id`) |
| 133 | + ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
| 134 | +| |
| 135 | +*/ |
| 136 | +$config['rest_enable_logging'] = FALSE; |
| 137 | + |
| 138 | +/* |
| 139 | +|-------------------------------------------------------------------------- |
| 140 | +| REST Enable Limits |
| 141 | +|-------------------------------------------------------------------------- |
| 142 | +| |
| 143 | +| When set to true REST_Controller will count the number of uses of each method |
| 144 | +| by an API key each hour. This is a general rule that can be overridden in the |
| 145 | +| $this->method array in each controller. |
98 | 146 | | |
99 | 147 | | FALSE |
| 148 | +| |
| 149 | + CREATE TABLE `limits` ( |
| 150 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 151 | + `uri` varchar(255) NOT NULL, |
| 152 | + `count` int(10) NOT NULL, |
| 153 | + `hour_started` int(11) NOT NULL, |
| 154 | + `api_key` varchar(40) NOT NULL, |
| 155 | + PRIMARY KEY (`id`) |
| 156 | + ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
100 | 157 | | |
101 | 158 | */ |
102 | | -$config['rest_enable_logging'] = TRUE; |
| 159 | +$config['rest_enable_limits'] = FALSE; |
103 | 160 |
|
104 | 161 | /* |
105 | 162 | |-------------------------------------------------------------------------- |
|
0 commit comments