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 | |
/** | |
* Update this script to include your client ID and secret. You can also | |
* pass them along as command line arguments. | |
* Copyright 2017 Yahoo Inc. Licensed under the terms of the zLib license see https://opensource.org/licenses/Zlib for terms. | |
*/ | |
$client_id = 'INSERT_CLIENT_ID_HERE'; | |
$client_secret = 'INSERT_CLIENT_SECRET_HERE'; | |
// See if we want to pull client info from command line |
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 | |
/** | |
* Update this script to include your client ID and secret. You can also | |
* pass them along as command line arguments. | |
* Copyright 2017 Yahoo Inc. Licensed under the terms of the zLib license see https://opensource.org/licenses/Zlib for terms. | |
*/ | |
$client_id = 'INSERT_CLIENT_ID_HERE'; | |
$client_secret = 'INSERT_CLIENT_SECRET_HERE'; | |
$game_keys = 'nfl'; |
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
// Weather API sample javascript code | |
// Requires: jQuery and crypto-js (v3.1.9) | |
// | |
// Copyright 2019 Oath Inc. Licensed under the terms of the zLib license see https://opensource.org/licenses/Zlib for terms. | |
var url = 'https://weather-ydn-yql.media.yahoo.com/forecastrss'; | |
var method = 'GET'; | |
var app_id = 'your-app-id'; | |
var consumer_key = 'your-consumer-key'; | |
var consumer_secret = 'your-consumer-secret'; |
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
""" | |
Weather API Python sample code | |
Copyright 2019 Oath Inc. Licensed under the terms of the zLib license see https://opensource.org/licenses/Zlib for terms. | |
$ python --version | |
Python 2.7.10 | |
""" | |
import time, uuid, urllib, urllib2 |
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
// Yahoo Weather API C# Sample Code | |
// Code sample offered under the terms of the CC0 Public Domain designation. See https://creativecommons.org/publicdomain/zero/1.0/legalcode/ for terms. | |
// Author: Eugene Plotnikov | |
using System; | |
using System.Net; | |
using System.Security.Cryptography; | |
using System.Text; |
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
// Copyright 2019 Oath Inc. Licensed under the terms of the zLib license see https://opensource.org/licenses/Zlib for terms. | |
import com.android.volley.AuthFailureError; | |
import com.android.volley.NetworkResponse; | |
import com.android.volley.ParseError; | |
import com.android.volley.Response; | |
import com.android.volley.toolbox.HttpHeaderParser; | |
import com.android.volley.toolbox.JsonRequest; | |
import com.google.gson.JsonSyntaxException; |
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
// | |
// ViewController.m | |
// weather-api-demo-objc | |
// | |
// Copyright 2019 Oath Inc. Licensed under the terms of the zLib license see https://opensource.org/licenses/Zlib for terms. | |
// | |
#import "ViewController.h" | |
#import "YahooWeatherAPI.h" |
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
// | |
// ViewController.swift | |
// Weather API Sample Code | |
// | |
// Copyright 2019 Oath Inc. Licensed under the terms of the zLib license see https://opensource.org/licenses/Zlib for terms. | |
// | |
import UIKit | |
/* |
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
// Require node-oauth package: npm install oauth | |
// Copyright 2019 Oath Inc. Licensed under the terms of the zLib license see https://opensource.org/licenses/Zlib for terms. | |
var OAuth = require('oauth'); | |
var header = { | |
"X-Yahoo-App-Id": "your-app-id" | |
}; | |
var request = new OAuth.OAuth( | |
null, | |
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
{ | |
"location":{ | |
"woeid": 2502265, | |
"city":"Sunnyvale", | |
"region":" CA", | |
"country":"United States", | |
"lat":37.371609, | |
"long":-122.038254, | |
"timezone_id":"America/Los_Angeles" | |
}, |