|
10 | 10 | ini_set('display_errors', 'On'); |
11 | 11 | use Contentstack\Contentstack; |
12 | 12 | include_once "../src/index.php"; |
13 | | - $stack = Contentstack::Stack('<API_KEY>', '<ACCESS_TOKEN>', '<ENVIRONMENT>'); |
| 13 | + $stack = Contentstack::Stack('', '', ''); |
14 | 14 | try { |
15 | 15 | // \Contentstack\Utility\debug($stack); |
16 | | - //$result = $stack->ContentType('test')->Query()->IncludeReferenceContentTypeUID()->toJSON()->find(); |
17 | | - //$result = $stack->ContentType('ctwithallfields')->Query()->includeCount()->toJSON()->find(); |
| 16 | + // $result = $stack->getContentTypes('{"include_snippet_schema": "false"}'); |
| 17 | + // $result = $stack->ContentType('java')->Query()->toJSON()->find(); |
18 | 18 |
|
19 | 19 | //$result = $stack->ContentType('ctwithallfields')->Query()->addParam('include_dimension', 'true')->toJSON()->find(); |
20 | | - // $result = $stack->ContentType('ctwithallfields')->Query()->addParam('include_dimensions', true)->toJSON()->find(); |
| 20 | + // $result = $stack->ContentType('ctwithallfields')->Query()->addParam('include_dimensions', true)->toJSON()->find(); |
21 | 21 | //$result = $stack->ContentType('ctwithallfields')->Entry('blt8d1ab7600ba4c2b4')->addParam('include_dimensions', true)->toJSON()->fetch(); |
22 | 22 | // $result = $stack->Assets()->Query()->addParam('key', 'true')->toJSON()->find(); |
23 | 23 | //$result = $stack->Assets('blt9b5825dd804a9067')->addParam('include_dimension', 'true')->fetch(); |
24 | | - // \Contentstack\Utility\debug(($result[0])); |
| 24 | + \Contentstack\Utility\debug(($result)); |
25 | 25 |
|
26 | 26 | } catch(Exception $e) { |
| 27 | + \Contentstack\Utility\debug("sdcnjksdcjkdsbcjd"); |
27 | 28 | echo "Message : ".$e->getMessage(); // returns message -> API -> error_message |
28 | 29 | echo "Code : ".$e->getCode(); // returns number -> API -> error_code |
29 | 30 | echo "Errors : ".print_r($e->getErrors()); // returns array -> API -> errors |
|
0 commit comments