Created
April 22, 2021 21:31
-
-
Save JoeGlines/a6a6d07564f63c3cbec1e4f6281b2c05 to your computer and use it in GitHub Desktop.
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
;******************************************************* | |
; 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_Token ,Auth.ini,API, Token | |
;***********Clearbit API: docmentation: https://dashboard.clearbit.com/docs******************* | |
EndPoint:="https://prospector.clearbit.com/v1/people/search" ;streaming so waits for response | |
;~ QueryString:=QueryString_Builder({"domain":"the-automator.com","limit":"15"}) | |
;~ MsgBox % QueryString | |
;~ QueryString:=QueryString_Builder({"domain":"ge.com","limit":"15","title":"engineer"}) | |
;~ QueryString:=QueryString_Builder({"domain":"ge.com","limit":"15","titles[]":"software","titles[]":"marketing"}) | |
QueryString:=QueryString_Builder({"domain":"the-automator.com","limit":"1","email":"true"}) | |
;***********API Call ******************* | |
HTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1") | |
HTTP.Open("GET",EndPoint . QueryString) | |
HTTP.SetRequestHeader("Authorization", "Bearer " . API_Token) | |
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