This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $client = new \GuzzleHttp\Client([ | |
| 'base_uri' => 'https://example.com/wp-json/wp/v2/' | |
| ]); | |
| $response = $client->get('media',[ | |
| 'query' => ['search' => 'sample'] | |
| ]); | |
| $result = json_decode($response->getBody()->getContents()); | |
| return (count($result)) ? $result[0]->id : null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $client = new \GuzzleHttp\Client(); | |
| $response = $client->get('https://example.com/sample.jpg'); | |
| $image = $response->getBody()->getContents(); | |
| $client = new \GuzzleHttp\Client([ | |
| 'base_uri' => 'https://example.com/wp-json/wp/v2/' | |
| ]); | |
| $response = $client->post('media',[ | |
| 'auth' => [$user, $password], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $client = new \GuzzleHttp\Client([ | |
| 'base_uri' => 'https://example.com/wp-json/wp/v2/' | |
| ]); | |
| $client->post('posts',[ | |
| 'auth' => [$user, $password], | |
| 'form_params' => [ | |
| 'title' => 'WP REST API Example', | |
| 'content' => '<p>サンプル記事。Guzzle使用</p>', | |
| 'date' => '2019-07-10T20:00:00+09:00', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $client = new \GuzzleHttp\Client([ | |
| 'base_uri' => 'https://example.com/wp-json/wp/v2/' | |
| ]); | |
| $client->post('posts',[ | |
| 'auth' => [$user, $password], | |
| 'form_params' => [ | |
| 'title' => 'WP REST API Example', | |
| 'content' => '<p>サンプル記事。Guzzle使用</p>', | |
| 'status' => 'publish', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: 2.1 | |
| orbs: | |
| aws-cli: circleci/aws-cli@0.1.13 | |
| jobs: | |
| build: | |
| working_directory: ~/repo | |
| environment: | |
| - AWS_S3_BUCKET_NAME: your-s3-bucket-name | |
| docker: | |
| - image: innovatorjapan/awscli:latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| options: { | |
| elements: { | |
| line: { | |
| tension: 0 | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="small"> | |
| <line-chart | |
| v-if="loaded" | |
| :chart-data="datacollection" | |
| :options="options"/> | |
| </div> | |
| </template> | |
| <script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| options: { | |
| elements: { | |
| line: { | |
| fill: false | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| datacollection: { | |
| labels: ['2019/06/01','2019/06/02','2019/06/03','2019/06/04','2019/06/04'], | |
| datasets: [{ | |
| label: '来店者数', | |
| data: [9, 47, 11, 24, 67], | |
| fill: false | |
| }, | |
| { | |
| label: '売上高', | |
| data: [1700, 56000, 2200, 32000, 34000, 112000], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $goutte = GoutteFacade::request('GET',$review_url); | |
| $star = $goutte->filter('.crAvgStars')->filter('img')->attr('src'); |