-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathclient.py
26 lines (17 loc) · 802 Bytes
/
client.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
#def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
#print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.
# Press the green button in the gutter to run the script.
#if __name__ == '__main__':
# print_hi('PyCharm')
# See PyCharm help at https://www.jetbrains.com/help/pycharm/
import requests
def build(mock_url,buildnum):
uri=mock_url+'/builds/'+str(buildnum)
return requests.get(uri).json()
# note:
# this (client.py) service is requesting another service (jenkins build server for json output)
# in this case we are calling mock_url