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
curl - header "apikey: YOUR_APP_KEY" "https://api.triathlon.org/v1/statistics/results?analysis=count_unique&target_property=event.name&group_by=event.name|program.id|program.name" |
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 requests | |
import json | |
from pprint import pprint | |
#replace YOUR_API_KEY with your key | |
apikey = 'YOUR_API_KEY' | |
url = 'https://api.triathlon.org/v1/statistics/results?' | |
query = 'analysis=count_unique&target_property=event.name&group_by=event.name|program.id|program.name' | |
local_filename = 'test.txt' |
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 requests | |
import json | |
from pprint import pprint | |
apikey = 'YOUR_API_KEY' | |
url = 'https://api.triathlon.org/v1/statistics/results?' | |
query = "analysis=minimum&target_property=position&filters=program.id,eq,{0}&group_by=athlete.name|athlete.id|program.start_time|program.wetsuit|splits.swim|splits.swim_distance|splits.bike|splits.bike_distance|splits.run|splits.run_distance|splits.t1|splits.t2|temperature.air|temperature.water|format|event.id|event.country|event.venue|finish_time" | |
local_filename = 'test.txt' | |
params = {} |
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
with open(local_filename, 'wb') as f: | |
for chunk in r.iter_content(chunk_size=1024): | |
if chunk: # filter out keep-alive new chunks | |
f.write(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
import requests | |
import json | |
from pprint import pprint | |
apikey = 'YOUR_API_KEY' | |
url = 'https://api.triathlon.org/v1/athletes/' | |
query = '{0}?output=basic' | |
local_filename = 'test.txt' | |
params = {} |
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
render() { | |
return ( | |
<Fragment> | |
<ChildA /> | |
<ChildB /> | |
<ChildC /> | |
</Fragment> | |
); | |
} |
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
render() { | |
return ( | |
<React.Fragment> | |
<ChildA /> | |
<ChildB /> | |
<ChildC /> | |
</React.Fragment> | |
); | |
} |
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
handleChange = (name, area) => event => { | |
const value = event.target.value; | |
this.setState({ | |
[area]: { | |
...this.state[area], | |
[name]: value | |
} | |
}, () => { this.handleValidation(name, value); }); | |
} |
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
{ | |
"extends": "react-app", | |
"plugins": [ | |
"react-hooks" | |
], | |
"rules": { | |
"react-hooks/rules-of-hooks": "error" | |
} | |
} |
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 React, { Component } from 'react'; | |
import './App.css'; | |
import Example from './Example'; | |
class App extends Component { | |
render() { | |
return ( | |
<div className="App"> | |
<Example /> | |
</div> |
OlderNewer