Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
Created April 22, 2021 21:33
Show Gist options
  • Save JoeGlines/eae694c0c28ad41e993ff42b0b00f832 to your computer and use it in GitHub Desktop.
Save JoeGlines/eae694c0c28ad41e993ff42b0b00f832 to your computer and use it in GitHub Desktop.
;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY
; Right now you can get a coupon code here: https://the-Automator.com/Learn
;*******************************************************
;************************************************************
;************************************************************
IniRead, API_Key ,Auth.ini,API, Key
;~ https://portal.fullcontact.com/
;************Company Lookup************************************************
;~ EndPoint:="https://api.fullcontact.com/v2/company/lookup.xml"
;~ QueryString:=QueryString_Builder({"domain":"the-automator.com","keyPeople":"true"})
;~ MsgBox % QueryString
;***********Person Lookup*******************
EndPoint:="https://api.fullcontact.com/v2/person.xml"
;~ QueryString:=QueryString_Builder({"email":"[email protected]"})
;~ QueryString:=QueryString_Builder({"email":"[email protected]"})
QueryString:=QueryString_Builder({"phone":"+13037170414"})
;***********API Call*******************
HTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
HTTP.Open("GET",EndPoint . QueryString)
HTTP.SetRequestHeader("X-FullContact-APIKey", API_Key)
HTTP.Send()
Response:= HTTP.ResponseText
SciTE_Output(Response) ;Text,Clear=1,LineBreak=1,Exit=0
;************Query String builders*********
QueryString_Builder(kvp){
for key, value in kvp
queryString.=((A_Index="1")?(url "?"):("&")) key "=" value
return queryString
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment