This file contains 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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"encoding/json" | |
"time" | |
"os" | |
"encoding/csv" |
This file contains 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
#!/bin/sh | |
set -eu | |
cd `dirname $0` | |
URL='https://api.r-assistance.go.jp/v2/supports.json?appkey=0' | |
# install to jq command | |
echo $(curl ${URL}) | jq -r ".supports[] | [.id, .number, .name] | @csv" | sed -e 's/"//g' |
This file contains 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
const https = require('https'); | |
const fs = require('fs'); | |
const url = 'https://api.r-assistance.go.jp/v2/supports.json?appkey=0'; | |
https.get(url, (res) =>{ | |
let data = ''; | |
res.setEncoding('utf8'); | |
res.on('data', (chunk) => { |
This file contains 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 | |
$url = 'https://api.r-assistance.go.jp/v2/supports.json?appkey=0'; | |
$res = file_get_contents($url); | |
$json_data = json_decode($res,true); | |
$file = fopen('./files/php_sample.csv','a'); | |
foreach($json_data['supports'] as $data) { |
This file contains 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
import urllib2 | |
import json | |
import csv | |
def main(): | |
url = 'https://api.r-assistance.go.jp/v2/supports.json?appkey=0' | |
res = urllib2.urlopen(url) | |
file = open('./files/python_sample.csv', 'a') |
This file contains 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
require 'net/https' | |
require 'uri' | |
require 'json' | |
require 'csv' | |
url = 'https://api.r-assistance.go.jp/v2/supports.json?appkey=0' | |
uri = URI.parse(url) | |
json = Net::HTTP.get(uri) | |
res = JSON.parse(json) |
This file contains 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
#!/bin/bash | |
GIT_CMD="" | |
CURRENT_BRANCH="" | |
FORCE=false | |
# メニュー表示時の文言。 | |
PS3="ブランチを選択してください > " | |
if [ "${1}" == "" ] ; then | |
echo "引数が指定されていません" |