Tutti Nuovi

user:thomas utente che ha creato il gist

title:mygist titolo del gist

filename:myfile.txt nome di file nel gist

extension:yml estensione del file nel gist

language:go linguaggio del file nel gist

topic:homelab gists with given topic

Registrati

Entra


Tutti Nuovi Registrati Entra

rdsm

Unito 1699205554

Più recente creazione
Meno recente creazione
Più recente aggiornamento
Meno recente aggiornamento
Tutti i gists 1

rdsm / weather.rb

0 mi piace
0 forks
1 files
Ultima volta attivo 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
Più nuovi Più vecchi

Creato da Opengist ⋅ Load: 36ms⋅

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