This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"path/filepath" | |
"plugin" | |
) | |
func main() { | |
// Glob - Gets the plugin to be loaded |
This file contains hidden or 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
package main | |
import "fmt" | |
// Add two integers | |
func Add(a int, b int) int { | |
fmt.Printf("\nAdding a=%d and b=%d", a, b) | |
return a + b | |
} |
This file contains hidden or 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
package main | |
import ( | |
"github.com/pmoule/go2hal/hal" | |
"net/http" | |
"github.com/gorilla/mux" | |
"github.com/gorilla/handlers" | |
"os" | |
"fmt" | |
"github.com/auth0/go-jwt-middleware" |
This file contains hidden or 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
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
//Instantiate Async task | |
MyAsync myTask = new MyAsync(this); | |
//Run the task in an asynchronous way | |
myTask.execute("https://api.callhub.io/v2/conference/"); |
This file contains hidden or 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
public class MyAsync extends AsyncTask { | |
private Context mContext; | |
public MyAsync(Context context) { | |
//Relevant Context should be provided to newly created components (whether application context or activity context) | |
//getApplicationContext() - Returns the context for all activities running in application | |
mContext = context.getApplicationContext(); | |
} |
This file contains hidden or 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
import requests | |
url = "https://api.callhub.io/v1/phonebooks/" | |
headers = {"Authorization": "Token <YOUR_API_KEY>"} | |
r = requests.get(url, headers=headers) | |
print r,r.text |
This file contains hidden or 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
import requests | |
url = "https://api.callhub.io/v1/contacts/" | |
data = {"contact":"+11234567891","phonebook":"https://api.callhub.io/v1/phonebooks/123456/", "first_name":"Chetan"} | |
headers = {"Authorization": "Token <YOUR_API_KEY>"} | |
r = requests.post(url, data=data, headers=headers) | |
print r, r.text |
This file contains hidden or 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
import requests | |
url = "https://api.callhub.io/v1/contacts/" | |
headers = {"Authorization": "Token <YOUR_API_KEY>"} | |
r = requests.get(url, headers=headers) | |
print r, r.text |