https://api.vk.com/method/users.getFollowers
https://api.vk.com/method/users.getFollowers?user_id=1
{
'id':210700286,
'first_name':'Николай',
'last_name':'Иванов'
}
var request = URLRequest(url: URL(string: “https://api.vk.com/method/auth.restore?phone=79999999999")!)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
print(String(decoding: data!, as: UTF8.self))
print(response)
print(error)
}
task.resume()
https://api.vk.com/method/auth.restore?phone=79999999999
var request = URLRequest(url: URL(string: “https://v2.jokeapi.dev/joke/Any")!)
request.httpMethod = “GET”
request.allHTTPHeaderFields = [“AuthToken”: “null”]
let task = URLSession.shared.dataTask(with: request) { data, response, error in
print(String(decoding: data!, as: UTF8.self))
}
task.resume()
{
“error”: false,
“category”: “Misc”,
“type”: “single”,
“joke”: “My wife is really mad at the fact that I have no sense of direction.\nSo I packed up my stuff and right.”,
“flags”: {
“nsfw”: false,
“religious”: false,
“political”: false,
“racist”: false,
“sexist”: false,
“explicit”: false
},
“id”: 201,
“safe”: true,
“lang”: “en”
}