Todos Novo

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

Registrar-se

Entrar


Todos Novo Registrar-se Entrar

rdsm

Juntou-se 1699205554

Mais recente criado
Menos recente criado
Mais recente atualizado
Menos recente atualizado
Todos os gists 1

rdsm / weather.rb

0 curtidas
0 bifurcações
1 arquivos
Última atividade 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
Próximo Anterior

Desenvolvido por Opengist ⋅ Load: 36ms⋅

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