|
2 | 2 | "cells": [
|
3 | 3 | {
|
4 | 4 | "cell_type": "code",
|
5 |
| - "execution_count": 6, |
| 5 | + "execution_count": 12, |
6 | 6 | "metadata": {},
|
7 | 7 | "outputs": [
|
8 | 8 | {
|
|
11 | 11 | "text": [
|
12 | 12 | "3.7.9 (v3.7.9:13c94747c7, Aug 15 2020, 01:31:08) \n",
|
13 | 13 | "[Clang 6.0 (clang-600.0.57)]\n",
|
14 |
| - "1.4.0\n", |
| 14 | + "1.5.1\n", |
15 | 15 | "\n",
|
16 | 16 | "<Server logged_in=False database=test_database layout=test_layout>\n",
|
17 | 17 | "User: fmsrest\n",
|
18 | 18 | "Password: fmsrest\n",
|
19 | 19 | "Token: None\n",
|
20 | 20 | "Headers: {'Content-Type': 'application/json'}\n",
|
21 |
| - "Path: /fmi/data/v1/productInfo\n", |
22 |
| - "Result: {'name': 'FileMaker Data API Engine', 'buildDate': '07/22/2021', 'version': '19.3.2.203', 'dateFormat': 'MM/dd/yyyy', 'timeFormat': 'HH:mm:ss', 'timeStampFormat': 'MM/dd/yyyy HH:mm:ss'}\n", |
23 |
| - "Path: /fmi/data/v1/databases\n", |
| 21 | + "Path: /productInfo\n", |
| 22 | + "Result: {'name': 'FileMaker Data API Engine', 'buildDate': '12/08/2021', 'version': '19.4.2.204', 'dateFormat': 'MM/dd/yyyy', 'timeFormat': 'HH:mm:ss', 'timeStampFormat': 'MM/dd/yyyy HH:mm:ss'}\n", |
| 23 | + "Path: /databases\n", |
24 | 24 | "Result: [{'name': 'test_database'}]\n",
|
25 | 25 | "\n",
|
26 | 26 | "<Server logged_in=True database=test_database layout=test_layout>\n",
|
27 | 27 | "User: fmsrest\n",
|
28 | 28 | "Password: fmsrest\n",
|
29 |
| - "Token: 1faf2daaadd0fddda2bc4251f571c66e2549d4afb2a04dbc3866\n", |
| 29 | + "Token: 362138f85581e52ffc1f847f28067d80682b5fcddbcd6d3acdbc\n", |
30 | 30 | "Headers: {'Content-Type': 'application/json'}\n",
|
31 |
| - "Path: /fmi/data/v1/productInfo\n", |
32 |
| - "Result: {'name': 'FileMaker Data API Engine', 'buildDate': '07/22/2021', 'version': '19.3.2.203', 'dateFormat': 'MM/dd/yyyy', 'timeFormat': 'HH:mm:ss', 'timeStampFormat': 'MM/dd/yyyy HH:mm:ss'}\n", |
33 |
| - "Path: /fmi/data/v1/databases\n", |
34 |
| - "/fmi/data/v1/databases/{database}/layouts\n", |
| 31 | + "Path: /productInfo\n", |
| 32 | + "Result: {'name': 'FileMaker Data API Engine', 'buildDate': '12/08/2021', 'version': '19.4.2.204', 'dateFormat': 'MM/dd/yyyy', 'timeFormat': 'HH:mm:ss', 'timeStampFormat': 'MM/dd/yyyy HH:mm:ss'}\n", |
| 33 | + "Path: /databases\n", |
| 34 | + "Result: [{'name': 'test_database'}]\n", |
| 35 | + "\n", |
| 36 | + "/databases/{database}/layouts\n", |
35 | 37 | "[{'name': 'test_layout', 'table': ''}]\n",
|
36 |
| - "/fmi/data/v1/databases/{database}/scripts\n", |
| 38 | + "/databases/{database}/scripts\n", |
37 | 39 | "[]\n",
|
38 |
| - "/fmi/data/v1/databases/{database}/layouts\n" |
39 |
| - ] |
40 |
| - }, |
41 |
| - { |
42 |
| - "ename": "NameError", |
43 |
| - "evalue": "name 'layout' is not defined", |
44 |
| - "output_type": "error", |
45 |
| - "traceback": [ |
46 |
| - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
47 |
| - "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", |
48 |
| - "\u001b[0;32m/var/folders/jw/g7hfq88d7858lbhwm_l5x4vm0000gp/T/ipykernel_39793/3200453808.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 54\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 55\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mAPI_PATH\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'meta'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'layouts'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 56\u001b[0;31m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfms\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_layout\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 57\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 58\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
49 |
| - "\u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/fmrest/server.py\u001b[0m in \u001b[0;36mwrapper\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 126\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mwrapper\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 127\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mauto_relogin\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 128\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 129\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 130\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
50 |
| - "\u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/fmrest/server.py\u001b[0m in \u001b[0;36mget_layout\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 728\u001b[0m \u001b[0mnone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 729\u001b[0m \"\"\"\n\u001b[0;32m--> 730\u001b[0;31m path = API_PATH['meta']['layouts'] + f'/{layout}'.format(\n\u001b[0m\u001b[1;32m 731\u001b[0m \u001b[0mdatabase\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdatabase\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 732\u001b[0m \u001b[0mlayout\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlayout\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
51 |
| - "\u001b[0;31mNameError\u001b[0m: name 'layout' is not defined" |
| 40 | + "\n", |
| 41 | + "<Server logged_in=False database=test_database layout=test_layout>\n" |
52 | 42 | ]
|
53 | 43 | }
|
54 | 44 | ],
|
|
71 | 61 | "\t\t\t\t\tlayout='test_layout', \n",
|
72 | 62 | "\t\t\t\t\t# if you are testing without cert/domain \n",
|
73 | 63 | "\t\t\t\t\t# you may need the parameter verify_ssl=False here.\n",
|
74 |
| - "\t\t\t\t\tverify_ssl=False\n", |
| 64 | + "\t\t\t\t\tverify_ssl=False,\n", |
| 65 | + "\t\t\t\t\tapi_version='v1'\n", |
75 | 66 | ")\n",
|
76 | 67 | "\n",
|
77 | 68 | "print()\n",
|
|
98 | 89 | "print('Result: ', fms.get_product_info())\n",
|
99 | 90 | "\n",
|
100 | 91 | "print('Path: ', API_PATH['meta']['databases'])\n",
|
101 |
| - "#print('Result: ', fms.get_databases())\n", |
| 92 | + "print('Result: ', fms.get_databases())\n", |
102 | 93 | "\n",
|
| 94 | + "print()\n", |
103 | 95 | "\n",
|
104 | 96 | "print(API_PATH['meta']['layouts'])\n",
|
105 | 97 | "print(fms.get_layouts())\n",
|
106 | 98 | "\n",
|
107 | 99 | "print(API_PATH['meta']['scripts'])\n",
|
108 | 100 | "print(fms.get_scripts())\n",
|
109 | 101 | "\n",
|
110 |
| - "print(API_PATH['meta']['layouts'])\n", |
111 |
| - "print(fms.get_layout())\n", |
112 |
| - "\n", |
113 | 102 | "print()\n",
|
| 103 | + "\n", |
114 | 104 | "fms.logout()\n",
|
115 | 105 | "print(fms)\n"
|
116 | 106 | ]
|
|
0 commit comments