@azure-rest/agrifood-farming 1.0.0-alpha.20250108.1 → 1.0.0-alpha.20250109.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +13 -13
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -53,13 +53,13 @@ AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET
53
53
 
54
54
  Use the returned token credential to authenticate the client:
55
55
 
56
- ```typescript
57
- import FarmBeats from "@azure-rest/agrifood-farming";
56
+ ```ts snippet:CreateFarmBeatsClient
57
+ import { FarmBeats } from "@azure-rest/agrifood-farming";
58
58
  import { DefaultAzureCredential } from "@azure/identity";
59
59
 
60
60
  const client = FarmBeats(
61
61
  "https://<farmbeats resource name>.farmbeats.azure.net",
62
- new DefaultAzureCredential()
62
+ new DefaultAzureCredential(),
63
63
  );
64
64
  ```
65
65
 
@@ -95,17 +95,17 @@ Fam operations includes details pertaining to tilling, planting, application of
95
95
  Once you have authenticated and created the client object as shown in the [Authenticate the client](#create-and-authenticate-a-farmbeats-rest-client)
96
96
  section, you can create a party within the Data Manager for Agriculture resource like this:
97
97
 
98
- ```typescript
99
- import FarmBeats, { isUnexpected } from "@azure-rest/agrifood-farming";
98
+ ```ts snippet:CreateParty
99
+ import { FarmBeats, isUnexpected } from "@azure-rest/agrifood-farming";
100
100
  import { DefaultAzureCredential } from "@azure/identity";
101
101
 
102
102
  const client = FarmBeats(
103
103
  "https://<farmbeats resource name>.farmbeats.azure.net",
104
- new DefaultAzureCredential()
104
+ new DefaultAzureCredential(),
105
105
  );
106
106
 
107
107
  const partyId = "test_party";
108
- const result = await farmbeatsClient.path("/parties/{partyId}", partyId).patch({
108
+ const result = await client.path("/parties/{partyId}", partyId).patch({
109
109
  body: {
110
110
  name: "Contoso Party",
111
111
  description: "Your custom party description here",
@@ -126,22 +126,22 @@ console.log(`Created Party: ${party.name}`);
126
126
 
127
127
  ### List Parties
128
128
 
129
- ```typescript
130
- import FarmBeats, { isUnexpected } from "@azure-rest/agrifood-farming";
129
+ ```ts snippet:ListParties
130
+ import { FarmBeats, isUnexpected, paginate } from "@azure-rest/agrifood-farming";
131
131
  import { DefaultAzureCredential } from "@azure/identity";
132
132
 
133
133
  const client = FarmBeats(
134
134
  "https://<farmbeats resource name>.farmbeats.azure.net",
135
- new DefaultAzureCredential()
135
+ new DefaultAzureCredential(),
136
136
  );
137
137
 
138
- const response = await farmbeatsClient.path("/parties").get();
138
+ const response = await client.path("/parties").get();
139
139
 
140
140
  if (isUnexpected(response)) {
141
141
  throw response.body.error;
142
142
  }
143
143
 
144
- const parties = paginate(farmbeatsClient, response);
144
+ const parties = paginate(client, response);
145
145
 
146
146
  // Log each party id
147
147
  for await (const party of parties) {
@@ -160,7 +160,7 @@ For additional samples, please refer to the [samples folder][samples_folder]
160
160
 
161
161
  Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
162
162
 
163
- ```javascript
163
+ ```ts snippet:SetLogLevel
164
164
  import { setLogLevel } from "@azure/logger";
165
165
 
166
166
  setLogLevel("info");
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "sdk-type": "client",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "An isomorphic REST client library for the Azure FarmBeats Service.",
6
- "version": "1.0.0-alpha.20250108.1",
6
+ "version": "1.0.0-alpha.20250109.1",
7
7
  "keywords": [
8
8
  "node",
9
9
  "azure",
@@ -73,7 +73,7 @@
73
73
  "unit-test": "dev-tool run vendored cross-env TEST_MODE=playback && npm run unit-test:node && npm run unit-test:browser",
74
74
  "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
75
75
  "unit-test:node": "dev-tool run test:vitest",
76
- "update-snippets": "echo skipped"
76
+ "update-snippets": "dev-tool run update-snippets"
77
77
  },
78
78
  "sideEffects": false,
79
79
  "autoPublish": false,