-
-
Save rromanchuk/92b78b1f3a6dd4e12b39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.APISearchUsers(q) | |
@searchConnection.cancel if @searchConnection | |
url = API.usersURL | |
params = API.defaultParams({ q: q }) | |
@searchConnection = ApiClient.client.get(url, params) do |result| | |
if result.success? && result.object | |
puts "request state #{result.task.state}" | |
@searchConnection = nil | |
else | |
// Error | |
@searchConnection = nil | |
end | |
end | |
true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment