Acomodados packages para funcionar con gunicorn
This commit is contained in:
12
home/services/photos.py
Normal file
12
home/services/photos.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import requests
|
||||
|
||||
url = "https://api.unsplash.com/photos/"
|
||||
|
||||
def get(key):
|
||||
data = {
|
||||
'client_id': key,
|
||||
}
|
||||
|
||||
response = requests.get(url, params=data)
|
||||
return {'result': response.json()}
|
||||
|
||||
Reference in New Issue
Block a user