Všechno Nové

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Registrovat

Přihlásit se


Všechno Nové Registrovat Přihlásit se

rdsm

Připojeno 1699205554

Nedávno Vytvořeno
Nejméně nedávno Vytvořeno
Nedávno Aktualizováno
Nejméně nedávno Aktualizováno
Všechny gisty 1

rdsm / weather.rb

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 1724760187
1 require 'net/http'
2 require 'uri'
3 require 'json'
4
5 def get_location(city)
6 url = URI("https://nominatim.openstreetmap.org/search?format=json&q=#{city}&limit=1")
7
8 response = Net::HTTP.get(URI(url))
9 JSON.parse(response)[0]
10 end
Novější Starší

Vytvořeno pomocí Opengist ⋅ Load: 23ms⋅

Čeština
Čeština Deutsch English Español Français Magyar Italiano Polski Português Русский Türkçe Українська 中文 繁體中文