From 1d999fd805779026ed7da07c216b9d5f775f8bb8 Mon Sep 17 00:00:00 2001 From: Joseph Little Date: Tue, 23 Jul 2024 09:30:56 +0100 Subject: [PATCH] fixing the ids to strings --- .../DeleteAllAccountGroups.go | 3 +- .../GetAccountGroupByID.go | 2 +- .../UpdateAccountGroupByID.go | 2 +- .../DeleteAccountByID/DeleteAccountByID.go | 2 +- .../accounts/GetAccountByID/GetAccountByID.go | 2 +- .../UpdateAccountByID/UpdateAccountByID.go | 2 +- .../DeleteAdvancedComputerSearchByID.go | 2 +- .../GetAdvancedComputerSearchByID.go | 2 +- .../UpdateAdvancedComputerSearchByID.go | 2 +- .../DeleteAdvancedMobileDeviceSearchByID.go | 4 +-- .../GetAdvancedMobileDeviceSearchByID.go | 4 +-- .../UpdateAdvancedMobileDeviceSearchByID.go | 2 +- .../DeleteAdvancedUserSearchByID.go | 2 +- .../GetAdvancedUserSearchByID.go | 2 +- .../UpdateAdvancedUserSearchByID.go | 2 +- .../DeleteAllowedFileExtensionByID.go | 2 +- .../DeleteAllowedFileExtensionByName.go | 31 ------------------- .../GetAllowedFileExtensionByID.go | 2 +- .../DeleteBYOProfileByID.go | 2 +- .../GetBYOProfileByID/GetBYOProfileByID.go | 2 +- .../UpdateBYOProfileByID.go | 2 +- .../DeleteClassByID/DeleteClassByID.go | 4 +-- .../classes/GetClassesByID/GetClassesByID.go | 5 +-- .../UpdateClassesByID/UpdateClassesByID.go | 2 +- .../DeleteAllComputerExtensionAttributes.go | 3 +- .../DeleteComputerExtensionAttributeByID.go | 2 +- ...eteComputerExtensionAttributeByNameByID.go | 29 ----------------- .../ExportComputerExtensionAttributes.go | 3 +- .../GetComputerExtensionAttributeByID.go | 2 +- .../UpdateComputerExtensionAttributeByID.go | 2 +- .../GetComputerHistoryByComputerID.go | 2 +- ...omputerHistoryByComputerIDAndDataSubset.go | 2 +- .../DeleteComputerInvitationByID.go | 2 +- .../GetComputerInvitationByID.go | 2 +- .../GetComputerInvitationsByInvitationID.go | 2 +- .../DeleteComputerByID/DeleteComputerByID.go | 2 +- .../GetComputerByID/GetComputerByID.go | 2 +- .../UpdateComputerByID/UpdateComputerByID.go | 2 +- .../DeleteDirectoryBindingByID.go | 2 +- .../GetDirectoryBindingByID.go | 2 +- .../UpdateDirectoryBindingByID.go | 2 +- .../DeleteDiskEncryptionConfigurationByID.go | 2 +- .../GetDiskEncryptionConfigurationByID.go | 2 +- ...nConfigurationByIDIndividualRecoveryKey.go | 2 +- .../DeleteAllDockItems/DeleteAllDockItems.go | 3 +- .../DeleteDockItemsByID.go | 2 +- .../GetDockItemsByID/GetDockItemsByID.go | 2 +- .../UpdateDockItemsByID/UpdateDockItemByID.go | 2 +- .../ebooks/DeleteEbookByID/DeleteEbookByID.go | 2 +- .../ebooks/GetEbooksByID/GetEbooksByID.go | 2 +- .../ebooks/UpdateEbookByID/UpdateEbookByID.go | 2 +- .../DeleteFileShareDistributionPointByID.go | 2 +- .../GetFileShareDistributionPointByID.go | 2 +- .../UpdateFileShareDistributionPointByID.go | 2 +- .../DeleteIBeaconByID/DeleteIBeaconByID.go | 2 +- .../ibeacons/GetIBeaconByID/GetIBeaconByID.go | 2 +- .../UpdateIBeaconByID/UpdateIBeaconByID.go | 2 +- examples/icon/DownloadIcon/DownloadIcon.go | 2 +- .../DeleteApiIntegrationByID.go | 2 +- .../GetApiIntegrationByID.go | 2 +- .../UpdateApiIntegrationByID.go | 2 +- .../DeleteLDAPServerByID.go | 2 +- .../GetLDAPServerByID/GetLDAPServerByID.go | 2 +- .../GetLDAPServerByIDAndGroupDataSubset.go | 2 +- .../GetLDAPServerByIDAndUserDataSubset.go | 2 +- ...rByIDAndUserMembershipInGroupDataSubset.go | 2 +- .../UpdateLDAPServerByID.go | 2 +- .../DeleteLicensedSoftwareByID.go | 2 +- .../GetLicensedSoftwareByID.go | 2 +- .../UpdateLicensedSoftwareByID.go | 2 +- .../DeleteMacApplicationByID.go | 2 +- .../GetMacApplicationByID.go | 2 +- .../GetMacApplicationByIDAndDataSubset.go | 2 +- .../UpdateMacApplicationByID.go | 4 +-- .../DeleteAllMacOSConfigurationProfiles.go | 3 +- .../DeleteMacOSConfigurationProfileByID.go | 2 +- .../GetMacOSConfigurationProfileByID.go | 2 +- .../UpdateMacOSConfigurationProfileByID.go | 2 +- ...SConfigurationProfileByIDWithFileUpload.go | 2 +- .../DeleteMobileDeviceApplicationpByID.go | 2 +- .../GetMobileDeviceApplicationByID.go | 2 +- ...obileDeviceApplicationByIDAndDataSubset.go | 2 +- .../UpdateMobileDeviceApplicationByID.go | 2 +- ...obileDeviceApplicationByIDAndAppVersion.go | 2 +- ...eteMobileDeviceConfigurationProfileByID.go | 2 +- ...GetMobileDeviceConfigurationProfileByID.go | 2 +- ...eviceConfigurationProfileByIDWithSubset.go | 2 +- ...ateMobileDeviceConfigurationProfileByID.go | 2 +- .../DeleteMobileDeviceGroupByID.go | 2 +- .../GetMobileDeviceGroupsByID.go | 2 +- .../UpdateMobileDeviceGroupByIDSmart.go | 2 +- .../UpdateMobileDeviceGroupByIDStatic.go | 2 +- ...bileDeviceGroupByIDStaticGroupAdditions.go | 2 +- ...bileDeviceGroupByIDStaticGroupDeletions.go | 2 +- ...DeleteMobileDeviceEnrollmentProfileByID.go | 2 +- .../GetMobileDeviceEnrollmentProfileByID.go | 2 +- ...leDeviceEnrollmentProfileByIDWithSubset.go | 2 +- ...UpdateMobileDeviceEnrollmentProfileByID.go | 2 +- ...eateMobileDeviceProvisioningProfileByID.go | 2 +- ...leteMobileDeviceProvisioningProfileByID.go | 2 +- .../GetMobileDeviceProvisioningProfileByID.go | 2 +- ...dateMobileDeviceProvisioningProfileByID.go | 2 +- .../DeleteMobileDeviceByID.go | 2 +- .../GetMobileDeviceByIDAndDataSubset.go | 2 +- .../GetMobileDevicesByID.go | 2 +- .../UpdateMobileDeviceByID.go | 2 +- .../DeleteMobileExtensionAttributeByID.go | 2 +- .../GetMobileExtensionAttributeByID.go | 2 +- .../UpdateMobileExtensionAttributeByID.go | 2 +- .../DeleteNetworkSegmentByID.go | 2 +- .../GetNetworkSegmentByID.go | 2 +- .../UpdateNetworkSegmentByID.go | 2 +- .../DeletePatchPolicyByID.go | 2 +- .../GetPatchPoliciesByID.go | 2 +- .../GetPatchPolicyByIDAndDataSubset.go | 4 +-- .../DeletePolicyByID/DeletePolicyByID.go | 2 +- .../policies/GetPolicyByID/GetPolicyByID.go | 2 +- .../UpdatePolicyByID/UpdatePolicyByID.go | 2 +- .../DeleteAllPrinters/DeleteAllPrinters.go | 3 +- .../DeletePrinterByID/DeletePrinterByID.go | 2 +- .../printers/GetPrinterByID/GetPrinterByID.go | 2 +- .../UpdatePrinterByID/UpdatePrinterByID.go | 5 +-- .../UpdatePrinterByName.go | 3 +- .../DeleteRemovableMACAddressByID.go | 2 +- .../GetRemovableMACAddressByID.go | 2 +- .../UpdateRemovableMACAddressByID.go | 3 +- .../DeleteRestrictedSoftwareByID.go | 2 +- .../GetRestrictedSoftwareByID.go | 2 +- .../UpdateRestrictedSoftwareByID.go | 5 +-- .../UpdateRestrictedSoftwareByName.go | 3 +- .../sites/DeleteAllSites/DeleteAllSites.go | 3 +- .../sites/DeleteSiteByID/DeleteSiteByID.go | 3 +- examples/sites/GetSiteByID/GetSiteByID.go | 2 +- .../sites/UpdateSiteByID/UpdateSiteByID.go | 2 +- .../DeleteComputerGroupByID.go | 2 +- .../GetComputerGroupByID.go | 2 +- .../UpdateSmartComputerGroupByID.go | 2 +- .../DeleteSoftwareUpdateServerByID.go | 2 +- .../GetSoftwareUpdateServersByID.go | 2 +- .../UpdateSoftwareUpdateServerByID.go | 3 +- .../UpdateStaticComputerGroupByID.go | 2 +- .../DeleteUserExtensionAttributeByID.go | 2 +- .../GetUserExtensionAttributeByID.go | 2 +- .../UpdateUserExtensionAttributeByID.go | 2 +- .../DeleteAllUserGroups.go | 3 +- .../DeleteUserGroupByID.go | 2 +- .../GetUserGroupsByID/GetUserGroupsByID.go | 2 +- .../UpdateUserGroupByIDSmart.go | 2 +- .../UpdateUserGroupByIDStatic.go | 2 +- .../UpdateUserGroupByIDStaticAdditions.go | 2 +- .../UpdateUserGroupByIDStaticDeletions.go | 2 +- .../users/DeleteUserByID/DeleteUserByID.go | 2 +- examples/users/GetUserByID/GetUserByID.go | 2 +- .../users/UpdateUserByID/UpdateUserByID.go | 2 +- .../DeleteVPPAccountByID.go | 2 +- .../GetVPPAccountByID/GetVPPAccountByID.go | 2 +- .../UpdateVPPAccount/UpdateVPPAccount.go | 2 +- .../DeleteVPPAssignmentByID.go | 2 +- .../GetVPPAssignmentByID.go | 2 +- .../UpdateVPPAssignmentByID.go | 2 +- .../DeleteWebhookByID/DeleteWebhookByID.go | 2 +- .../webhooks/GetWebhookByID/GetWebhookByID.go | 2 +- .../UpdateWebhookByID/UpdateWebhookByID.go | 2 +- 163 files changed, 185 insertions(+), 229 deletions(-) delete mode 100644 examples/allowed_file_extensions/DeleteAllowedFileExtensionByName/DeleteAllowedFileExtensionByName.go delete mode 100644 examples/computer_extension_attributes/DeleteComputerExtensionAttributeByNameByID/DeleteComputerExtensionAttributeByNameByID.go diff --git a/examples/account_groups/DeleteAllAccountGroups/DeleteAllAccountGroups.go b/examples/account_groups/DeleteAllAccountGroups/DeleteAllAccountGroups.go index f0a9d3bb..90df31a6 100644 --- a/examples/account_groups/DeleteAllAccountGroups/DeleteAllAccountGroups.go +++ b/examples/account_groups/DeleteAllAccountGroups/DeleteAllAccountGroups.go @@ -3,6 +3,7 @@ package main import ( "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -30,7 +31,7 @@ func main() { fmt.Printf("Deleting account group ID: %d, Name: %s\n", group.ID, group.Name) // Using the function to delete account groups by ID - err = client.DeleteAccountGroupByID(group.ID) + err = client.DeleteAccountGroupByID(strconv.Itoa(group.ID)) if err != nil { log.Printf("Error deleting account group ID %d: %v\n", group.ID, err) continue // Move to the next group if there's an error diff --git a/examples/account_groups/GetAccountGroupByID/GetAccountGroupByID.go b/examples/account_groups/GetAccountGroupByID/GetAccountGroupByID.go index 1e1fdcb9..a2513ca9 100644 --- a/examples/account_groups/GetAccountGroupByID/GetAccountGroupByID.go +++ b/examples/account_groups/GetAccountGroupByID/GetAccountGroupByID.go @@ -19,7 +19,7 @@ func main() { } // Define the variable for the group ID - groupID := 3 // Change this value as needed + groupID := "1" // Change this value as needed // Call GetGroupByID function group, err := client.GetAccountGroupByID(groupID) diff --git a/examples/account_groups/UpdateAccountGroupByID/UpdateAccountGroupByID.go b/examples/account_groups/UpdateAccountGroupByID/UpdateAccountGroupByID.go index 8272eadd..abad048a 100644 --- a/examples/account_groups/UpdateAccountGroupByID/UpdateAccountGroupByID.go +++ b/examples/account_groups/UpdateAccountGroupByID/UpdateAccountGroupByID.go @@ -42,7 +42,7 @@ func main() { }, } - accountGroupID := 2 + accountGroupID := "1" // Call UpdateAccountGroupByID function updatedGroup, err := client.UpdateAccountGroupByID(accountGroupID, updatedAccountGroup) diff --git a/examples/accounts/DeleteAccountByID/DeleteAccountByID.go b/examples/accounts/DeleteAccountByID/DeleteAccountByID.go index 6c42fef5..5796ae55 100644 --- a/examples/accounts/DeleteAccountByID/DeleteAccountByID.go +++ b/examples/accounts/DeleteAccountByID/DeleteAccountByID.go @@ -18,7 +18,7 @@ func main() { } // Let's assume you want to delete an account with ID 31. - accountID := 388 + accountID := "388" // Call DeleteAccountByID function err = client.DeleteAccountByID(accountID) diff --git a/examples/accounts/GetAccountByID/GetAccountByID.go b/examples/accounts/GetAccountByID/GetAccountByID.go index 16330da2..317d8f22 100644 --- a/examples/accounts/GetAccountByID/GetAccountByID.go +++ b/examples/accounts/GetAccountByID/GetAccountByID.go @@ -19,7 +19,7 @@ func main() { } // Define the variable for the ID number - accountID := 2 // Change this value as needed + accountID := "2" // Change this value as needed // Call GetAccountByID function account, err := client.GetAccountByID(accountID) diff --git a/examples/accounts/UpdateAccountByID/UpdateAccountByID.go b/examples/accounts/UpdateAccountByID/UpdateAccountByID.go index 82b4d123..c2ae97e6 100644 --- a/examples/accounts/UpdateAccountByID/UpdateAccountByID.go +++ b/examples/accounts/UpdateAccountByID/UpdateAccountByID.go @@ -46,7 +46,7 @@ func main() { } // Let's assume we are updating an account with ID 1. - accountID := 501 + accountID := "501" // Call UpdateAccountByID function updatedAccount, err := client.UpdateAccountByID(accountID, accountDetail) diff --git a/examples/advanced_computer_searches/DeleteAdvancedComputerSearchByID/DeleteAdvancedComputerSearchByID.go b/examples/advanced_computer_searches/DeleteAdvancedComputerSearchByID/DeleteAdvancedComputerSearchByID.go index 242bfc5d..8978b24c 100644 --- a/examples/advanced_computer_searches/DeleteAdvancedComputerSearchByID/DeleteAdvancedComputerSearchByID.go +++ b/examples/advanced_computer_searches/DeleteAdvancedComputerSearchByID/DeleteAdvancedComputerSearchByID.go @@ -16,7 +16,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - advancedComputerSearchID := 1 // Replace 1 with the actual advanced computer search ID + advancedComputerSearchID := "1" // Replace 1 with the actual advanced computer search ID // Delete the advanced computer search by ID err = client.DeleteAdvancedComputerSearchByID(advancedComputerSearchID) diff --git a/examples/advanced_computer_searches/GetAdvancedComputerSearchByID/GetAdvancedComputerSearchByID.go b/examples/advanced_computer_searches/GetAdvancedComputerSearchByID/GetAdvancedComputerSearchByID.go index 03116e76..30d406d1 100644 --- a/examples/advanced_computer_searches/GetAdvancedComputerSearchByID/GetAdvancedComputerSearchByID.go +++ b/examples/advanced_computer_searches/GetAdvancedComputerSearchByID/GetAdvancedComputerSearchByID.go @@ -18,7 +18,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - advancedComputerSearchID := 1 // Replace 1 with the actual advanced computer search ID + advancedComputerSearchID := "1" // Replace 1 with the actual advanced computer search ID // Call GetAdvancedComputerSearchByID function using the constant ID advancedComputerSearch, err := client.GetAdvancedComputerSearchByID(advancedComputerSearchID) diff --git a/examples/advanced_computer_searches/UpdateAdvancedComputerSearchByID/UpdateAdvancedComputerSearchByID.go b/examples/advanced_computer_searches/UpdateAdvancedComputerSearchByID/UpdateAdvancedComputerSearchByID.go index fdb0c2e6..621b8994 100644 --- a/examples/advanced_computer_searches/UpdateAdvancedComputerSearchByID/UpdateAdvancedComputerSearchByID.go +++ b/examples/advanced_computer_searches/UpdateAdvancedComputerSearchByID/UpdateAdvancedComputerSearchByID.go @@ -57,7 +57,7 @@ func main() { }, } - searchID := 12 + searchID := "12" // Convert the profile to XML to see the output (optional, for debug purposes) xmlData, err := xml.MarshalIndent(updatedSearch, "", " ") diff --git a/examples/advanced_mobile_device_searches/DeleteAdvancedMobileDeviceSearchByID/DeleteAdvancedMobileDeviceSearchByID.go b/examples/advanced_mobile_device_searches/DeleteAdvancedMobileDeviceSearchByID/DeleteAdvancedMobileDeviceSearchByID.go index 87b08ccf..d9e88130 100644 --- a/examples/advanced_mobile_device_searches/DeleteAdvancedMobileDeviceSearchByID/DeleteAdvancedMobileDeviceSearchByID.go +++ b/examples/advanced_mobile_device_searches/DeleteAdvancedMobileDeviceSearchByID/DeleteAdvancedMobileDeviceSearchByID.go @@ -16,7 +16,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - SearchIDToDelete := 123 + SearchIDToDelete := "123" // Use the client to delete an advanced mobile device search by ID // Replace 123 with the actual ID @@ -24,6 +24,6 @@ func main() { if err != nil { log.Fatalf("Error deleting advanced mobile device search by ID: %v", err) } else { - log.Printf("Successfully deleted Advanced Mobile Device Search with ID: %d\n", SearchIDToDelete) + log.Printf("Successfully deleted Advanced Mobile Device Search with ID: %s\n", SearchIDToDelete) } } diff --git a/examples/advanced_mobile_device_searches/GetAdvancedMobileDeviceSearchByID/GetAdvancedMobileDeviceSearchByID.go b/examples/advanced_mobile_device_searches/GetAdvancedMobileDeviceSearchByID/GetAdvancedMobileDeviceSearchByID.go index f5b04cc0..5d79f61c 100644 --- a/examples/advanced_mobile_device_searches/GetAdvancedMobileDeviceSearchByID/GetAdvancedMobileDeviceSearchByID.go +++ b/examples/advanced_mobile_device_searches/GetAdvancedMobileDeviceSearchByID/GetAdvancedMobileDeviceSearchByID.go @@ -19,7 +19,7 @@ func main() { } // The ID of the advanced mobile device search you want to retrieve - searchID := 13 // Replace with the actual ID you want to retrieve + searchID := "13" // Replace with the actual ID you want to retrieve // Call the GetAdvancedMobileDeviceSearchByID function search, err := client.GetAdvancedMobileDeviceSearchByID(searchID) @@ -34,5 +34,5 @@ func main() { } // Print the pretty XML - fmt.Printf("Advanced Mobile Device Search (ID: %d):\n%s\n", searchID, string(output)) + fmt.Printf("Advanced Mobile Device Search (ID: %s):\n%s\n", searchID, string(output)) } diff --git a/examples/advanced_mobile_device_searches/UpdateAdvancedMobileDeviceSearchByID/UpdateAdvancedMobileDeviceSearchByID.go b/examples/advanced_mobile_device_searches/UpdateAdvancedMobileDeviceSearchByID/UpdateAdvancedMobileDeviceSearchByID.go index 4559b475..62175e86 100644 --- a/examples/advanced_mobile_device_searches/UpdateAdvancedMobileDeviceSearchByID/UpdateAdvancedMobileDeviceSearchByID.go +++ b/examples/advanced_mobile_device_searches/UpdateAdvancedMobileDeviceSearchByID/UpdateAdvancedMobileDeviceSearchByID.go @@ -57,7 +57,7 @@ func main() { }, } - searchID := 14 + searchID := "14" // Convert the profile to XML to see the output (optional, for debug purposes) xmlData, err := xml.MarshalIndent(updatedSearch, "", " ") diff --git a/examples/advanced_user_searches/DeleteAdvancedUserSearchByID/DeleteAdvancedUserSearchByID.go b/examples/advanced_user_searches/DeleteAdvancedUserSearchByID/DeleteAdvancedUserSearchByID.go index 017d5427..8e06289b 100644 --- a/examples/advanced_user_searches/DeleteAdvancedUserSearchByID/DeleteAdvancedUserSearchByID.go +++ b/examples/advanced_user_searches/DeleteAdvancedUserSearchByID/DeleteAdvancedUserSearchByID.go @@ -17,7 +17,7 @@ func main() { } // Delete advanced user search by ID - err = client.DeleteAdvancedUserSearchByID(123) // Replace 123 with the actual ID + err = client.DeleteAdvancedUserSearchByID("123") // Replace 123 with the actual ID if err != nil { log.Fatalf("Error deleting advanced user search by ID: %v", err) } diff --git a/examples/advanced_user_searches/GetAdvancedUserSearchByID/GetAdvancedUserSearchByID.go b/examples/advanced_user_searches/GetAdvancedUserSearchByID/GetAdvancedUserSearchByID.go index e7b83544..16c6c382 100644 --- a/examples/advanced_user_searches/GetAdvancedUserSearchByID/GetAdvancedUserSearchByID.go +++ b/examples/advanced_user_searches/GetAdvancedUserSearchByID/GetAdvancedUserSearchByID.go @@ -19,7 +19,7 @@ func main() { } // ID of the advanced user search to retrieve - advancedUserSearchID := 29 // Replace with the actual ID + advancedUserSearchID := "29" // Replace with the actual ID // Call GetAdvancedUserSearchByID function advancedUserSearch, err := client.GetAdvancedUserSearchByID(advancedUserSearchID) diff --git a/examples/advanced_user_searches/UpdateAdvancedUserSearchByID/UpdateAdvancedUserSearchByID.go b/examples/advanced_user_searches/UpdateAdvancedUserSearchByID/UpdateAdvancedUserSearchByID.go index 7cffcc20..dcc3a7fa 100644 --- a/examples/advanced_user_searches/UpdateAdvancedUserSearchByID/UpdateAdvancedUserSearchByID.go +++ b/examples/advanced_user_searches/UpdateAdvancedUserSearchByID/UpdateAdvancedUserSearchByID.go @@ -55,7 +55,7 @@ func main() { }, } - searchID := 17 // Replace 123 with the actual ID + searchID := "17" // Replace 123 with the actual ID // Update by ID updatedByID, err := client.UpdateAdvancedUserSearchByID(searchID, updatedAdvancedUserSearch) diff --git a/examples/allowed_file_extensions/DeleteAllowedFileExtensionByID/DeleteAllowedFileExtensionByID.go b/examples/allowed_file_extensions/DeleteAllowedFileExtensionByID/DeleteAllowedFileExtensionByID.go index 9454c086..e5f078e7 100644 --- a/examples/allowed_file_extensions/DeleteAllowedFileExtensionByID/DeleteAllowedFileExtensionByID.go +++ b/examples/allowed_file_extensions/DeleteAllowedFileExtensionByID/DeleteAllowedFileExtensionByID.go @@ -18,7 +18,7 @@ func main() { } // Define the ID of the file extension you want to delete - fileExtensionID := 147 // Replace with the ID of the extension you want to delete + fileExtensionID := "147" // Replace with the ID of the extension you want to delete // Call DeleteAllowedFileExtensionByID function err = client.DeleteAllowedFileExtensionByID(fileExtensionID) diff --git a/examples/allowed_file_extensions/DeleteAllowedFileExtensionByName/DeleteAllowedFileExtensionByName.go b/examples/allowed_file_extensions/DeleteAllowedFileExtensionByName/DeleteAllowedFileExtensionByName.go deleted file mode 100644 index 5ffd8146..00000000 --- a/examples/allowed_file_extensions/DeleteAllowedFileExtensionByName/DeleteAllowedFileExtensionByName.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "log" - - "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" -) - -func main() { - // Define the path to the JSON configuration file - configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json" - - // Initialize the Jamf Pro client with the HTTP client configuration - client, err := jamfpro.BuildClientWithConfigFile(configFilePath) - if err != nil { - log.Fatalf("Failed to initialize Jamf Pro client: %v", err) - } - - // Define the name of the file extension you want to delete - fileExtensionName := "qwerty3" // Replace with the name of the extension you want to delete - - // Call DeleteAllowedFileExtensionByNameByID function - err = client.DeleteAllowedFileExtensionByName(fileExtensionName) - if err != nil { - log.Fatalf("Error deleting allowed file extension by name: %v", err) - } - - // If the deletion was successful - fmt.Println("Allowed file extension deleted successfully by name!") -} diff --git a/examples/allowed_file_extensions/GetAllowedFileExtensionByID/GetAllowedFileExtensionByID.go b/examples/allowed_file_extensions/GetAllowedFileExtensionByID/GetAllowedFileExtensionByID.go index c480da4b..eb62883c 100644 --- a/examples/allowed_file_extensions/GetAllowedFileExtensionByID/GetAllowedFileExtensionByID.go +++ b/examples/allowed_file_extensions/GetAllowedFileExtensionByID/GetAllowedFileExtensionByID.go @@ -19,7 +19,7 @@ func main() { } // Define the ID for the file extension you want to fetch - fileExtensionID := 142 // Replace with the desired ID + fileExtensionID := "142" // Replace with the desired ID // Call GetAllowedFileExtensionByID function allowedExtension, err := client.GetAllowedFileExtensionByID(fileExtensionID) diff --git a/examples/byoprofiles/DeleteBYOProfileByID/DeleteBYOProfileByID.go b/examples/byoprofiles/DeleteBYOProfileByID/DeleteBYOProfileByID.go index 6f900d82..5cb11e1c 100644 --- a/examples/byoprofiles/DeleteBYOProfileByID/DeleteBYOProfileByID.go +++ b/examples/byoprofiles/DeleteBYOProfileByID/DeleteBYOProfileByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - profileID := 8 // Use the actual ID of the profile to be deleted + profileID := "8" // Use the actual ID of the profile to be deleted err = client.DeleteBYOProfileByID(profileID) if err != nil { diff --git a/examples/byoprofiles/GetBYOProfileByID/GetBYOProfileByID.go b/examples/byoprofiles/GetBYOProfileByID/GetBYOProfileByID.go index 008fba6c..917a3735 100644 --- a/examples/byoprofiles/GetBYOProfileByID/GetBYOProfileByID.go +++ b/examples/byoprofiles/GetBYOProfileByID/GetBYOProfileByID.go @@ -19,7 +19,7 @@ func main() { } // Replace with the actual ID you want to retrieve - profileID := 11 + profileID := "11" profile, err := client.GetBYOProfileByID(profileID) if err != nil { diff --git a/examples/byoprofiles/UpdateBYOProfileByID/UpdateBYOProfileByID.go b/examples/byoprofiles/UpdateBYOProfileByID/UpdateBYOProfileByID.go index a21b7aa6..fdcf4725 100644 --- a/examples/byoprofiles/UpdateBYOProfileByID/UpdateBYOProfileByID.go +++ b/examples/byoprofiles/UpdateBYOProfileByID/UpdateBYOProfileByID.go @@ -28,7 +28,7 @@ func main() { }, } - profileID := 4 // Use the actual ID of the profile to be updated + profileID := "4" // Use the actual ID of the profile to be updated // Convert the profile to XML to see the output (optional, for debug purposes) xmlData, err := xml.MarshalIndent(updatedProfile, "", " ") diff --git a/examples/classes/DeleteClassByID/DeleteClassByID.go b/examples/classes/DeleteClassByID/DeleteClassByID.go index 3f0c35e2..9db99260 100644 --- a/examples/classes/DeleteClassByID/DeleteClassByID.go +++ b/examples/classes/DeleteClassByID/DeleteClassByID.go @@ -18,14 +18,14 @@ func main() { } // The ID of the class you want to delete - classIDToDelete := 123 // Replace with the actual ID + classIDToDelete := "123" // Replace with the actual ID // Call the delete function with the class ID err = client.DeleteClassByID(classIDToDelete) if err != nil { log.Fatalf("Error deleting class by ID: %v", err) } else { - fmt.Printf("Class with ID %d deleted successfully.\n", classIDToDelete) + fmt.Printf("Class with ID %s deleted successfully.\n", classIDToDelete) } } diff --git a/examples/classes/GetClassesByID/GetClassesByID.go b/examples/classes/GetClassesByID/GetClassesByID.go index c24558b8..9ad1668f 100644 --- a/examples/classes/GetClassesByID/GetClassesByID.go +++ b/examples/classes/GetClassesByID/GetClassesByID.go @@ -3,6 +3,7 @@ package main import ( "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -17,7 +18,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - classID := 1 // Replace with the actual ID of the class you want to fetch + classID := "1" // Replace with the actual ID of the class you want to fetch // Get class by ID class, err := client.GetClassByID(classID) @@ -25,6 +26,6 @@ func main() { log.Fatalf("Error fetching class by ID: %s\n", err) } - fmt.Printf("Class ID: %d, Name: %s, Description: %s\n", class.ID, class.Name, class.Description) + fmt.Printf("Class ID: %v, Name: %s, Description: %s\n", strconv.Itoa(class.ID), class.Name, class.Description) // Output additional class details as needed } diff --git a/examples/classes/UpdateClassesByID/UpdateClassesByID.go b/examples/classes/UpdateClassesByID/UpdateClassesByID.go index 3701791e..104ca08c 100644 --- a/examples/classes/UpdateClassesByID/UpdateClassesByID.go +++ b/examples/classes/UpdateClassesByID/UpdateClassesByID.go @@ -50,7 +50,7 @@ func main() { // Ensure other fields are aligned with the ResourceClass struct definition } - classID := 7 + classID := "7" // Call the update function with the class ID and the new details. err = client.UpdateClassByID(classID, updatedClass) diff --git a/examples/computer_extension_attributes/DeleteAllComputerExtensionAttributes/DeleteAllComputerExtensionAttributes.go b/examples/computer_extension_attributes/DeleteAllComputerExtensionAttributes/DeleteAllComputerExtensionAttributes.go index 040e6cfc..406f3e8d 100644 --- a/examples/computer_extension_attributes/DeleteAllComputerExtensionAttributes/DeleteAllComputerExtensionAttributes.go +++ b/examples/computer_extension_attributes/DeleteAllComputerExtensionAttributes/DeleteAllComputerExtensionAttributes.go @@ -3,6 +3,7 @@ package main import ( "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -29,7 +30,7 @@ func main() { for _, extAtt := range extAtts.Results { fmt.Printf("Deleting computer extension attribute ID: %d, Name: %s\n", extAtt.ID, extAtt.Name) - err = client.DeleteComputerExtensionAttributeByID(extAtt.ID) + err = client.DeleteComputerExtensionAttributeByID(strconv.Itoa(extAtt.ID)) if err != nil { log.Printf("Error deleting computer extension attribute ID %d: %v\n", extAtt.ID, err) continue // Move to the next computer extension attribute if there's an error diff --git a/examples/computer_extension_attributes/DeleteComputerExtensionAttributeByID/DeleteComputerExtensionAttributeByID.go b/examples/computer_extension_attributes/DeleteComputerExtensionAttributeByID/DeleteComputerExtensionAttributeByID.go index e31982b2..2762ab1a 100644 --- a/examples/computer_extension_attributes/DeleteComputerExtensionAttributeByID/DeleteComputerExtensionAttributeByID.go +++ b/examples/computer_extension_attributes/DeleteComputerExtensionAttributeByID/DeleteComputerExtensionAttributeByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - AttributeIDToDelete := 1 // Replace 1 with the actual attribute ID + AttributeIDToDelete := "1" // Replace 1 with the actual attribute ID // Deleting the attribute with specified ID err = client.DeleteComputerExtensionAttributeByID(AttributeIDToDelete) diff --git a/examples/computer_extension_attributes/DeleteComputerExtensionAttributeByNameByID/DeleteComputerExtensionAttributeByNameByID.go b/examples/computer_extension_attributes/DeleteComputerExtensionAttributeByNameByID/DeleteComputerExtensionAttributeByNameByID.go deleted file mode 100644 index 6f2577b2..00000000 --- a/examples/computer_extension_attributes/DeleteComputerExtensionAttributeByNameByID/DeleteComputerExtensionAttributeByNameByID.go +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "fmt" - "log" - - "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" -) - -func main() { - // Define the path to the JSON configuration file - configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json" - - // Initialize the Jamf Pro client with the HTTP client configuration - client, err := jamfpro.BuildClientWithConfigFile(configFilePath) - if err != nil { - log.Fatalf("Failed to initialize Jamf Pro client: %v", err) - } - - attributeName := "Battery Cycle Count" - - // Call DeleteComputerExtensionAttributeByName function - err = client.DeleteComputerExtensionAttributeByNameByID(attributeName) - if err != nil { - log.Fatalf("Error deleting Computer Extension Attribute by name: %v", err) - } - - fmt.Println("Successfully deleted Computer Extension Attribute:", attributeName) -} diff --git a/examples/computer_extension_attributes/ExportComputerExtensionAttributes/ExportComputerExtensionAttributes.go b/examples/computer_extension_attributes/ExportComputerExtensionAttributes/ExportComputerExtensionAttributes.go index 89fbfcf0..caf31767 100644 --- a/examples/computer_extension_attributes/ExportComputerExtensionAttributes/ExportComputerExtensionAttributes.go +++ b/examples/computer_extension_attributes/ExportComputerExtensionAttributes/ExportComputerExtensionAttributes.go @@ -6,6 +6,7 @@ import ( "os" "path/filepath" "regexp" + "strconv" "strings" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" @@ -51,7 +52,7 @@ func main() { log.Printf("Processing extension attribute '%s' (ID: %d)\n", attributeItem.Name, attributeItem.ID) // Get details for each attribute - attribute, err := client.GetComputerExtensionAttributeByID(attributeItem.ID) + attribute, err := client.GetComputerExtensionAttributeByID(strconv.Itoa(attributeItem.ID)) if err != nil { log.Printf("Failed to fetch details for attribute %s (ID: %d): %v", attributeItem.Name, attributeItem.ID, err) continue diff --git a/examples/computer_extension_attributes/GetComputerExtensionAttributeByID/GetComputerExtensionAttributeByID.go b/examples/computer_extension_attributes/GetComputerExtensionAttributeByID/GetComputerExtensionAttributeByID.go index 50cc990d..919a1dcd 100644 --- a/examples/computer_extension_attributes/GetComputerExtensionAttributeByID/GetComputerExtensionAttributeByID.go +++ b/examples/computer_extension_attributes/GetComputerExtensionAttributeByID/GetComputerExtensionAttributeByID.go @@ -19,7 +19,7 @@ func main() { } // Provide the ID of the computer extension attribute you want to fetch - attributeID := 1 // You can change this ID as required + attributeID := "1" // You can change this ID as required // Call GetComputerExtensionAttributeByID function attribute, err := client.GetComputerExtensionAttributeByID(attributeID) diff --git a/examples/computer_extension_attributes/UpdateComputerExtensionAttributeByID/UpdateComputerExtensionAttributeByID.go b/examples/computer_extension_attributes/UpdateComputerExtensionAttributeByID/UpdateComputerExtensionAttributeByID.go index fb10539c..4cb82835 100644 --- a/examples/computer_extension_attributes/UpdateComputerExtensionAttributeByID/UpdateComputerExtensionAttributeByID.go +++ b/examples/computer_extension_attributes/UpdateComputerExtensionAttributeByID/UpdateComputerExtensionAttributeByID.go @@ -28,7 +28,7 @@ func main() { } // Assuming you're updating the attribute with ID = 1 - updatedAttribute, err := client.UpdateComputerExtensionAttributeByID(1, attributeToUpdate) + updatedAttribute, err := client.UpdateComputerExtensionAttributeByID("1", attributeToUpdate) if err != nil { log.Fatalf("Error updating Computer Extension Attribute by ID: %v", err) } diff --git a/examples/computer_history/GetComputerHistoryByComputerID/GetComputerHistoryByComputerID.go b/examples/computer_history/GetComputerHistoryByComputerID/GetComputerHistoryByComputerID.go index 58352299..b437d610 100644 --- a/examples/computer_history/GetComputerHistoryByComputerID/GetComputerHistoryByComputerID.go +++ b/examples/computer_history/GetComputerHistoryByComputerID/GetComputerHistoryByComputerID.go @@ -19,7 +19,7 @@ func main() { } // Define the fuction parameters - computerID := 21 + computerID := "1" // Call the GetComputerHistoryByComputerID function computerHistory, err := client.GetComputerHistoryByComputerID(computerID) diff --git a/examples/computer_history/GetComputerHistoryByComputerIDAndDataSubset/GetComputerHistoryByComputerIDAndDataSubset.go b/examples/computer_history/GetComputerHistoryByComputerIDAndDataSubset/GetComputerHistoryByComputerIDAndDataSubset.go index 86ef5bca..d3938b79 100644 --- a/examples/computer_history/GetComputerHistoryByComputerIDAndDataSubset/GetComputerHistoryByComputerIDAndDataSubset.go +++ b/examples/computer_history/GetComputerHistoryByComputerIDAndDataSubset/GetComputerHistoryByComputerIDAndDataSubset.go @@ -19,7 +19,7 @@ func main() { } // Define the fuction parameters - computerID := 18 + computerID := "1" DataSubset := "General" // General / ComputerUsageLogs / Audits / PolicyLogs / CasperRemoteLogs / ScreenSharingLogs / CasperImagingLogs / Commands / UserLocation / MacAppStoreApplications // Call the GetComputerHistoryByComputerIDAndDataSubset function diff --git a/examples/computer_invitations/DeleteComputerInvitationByID/DeleteComputerInvitationByID.go b/examples/computer_invitations/DeleteComputerInvitationByID/DeleteComputerInvitationByID.go index 01553923..8c006964 100644 --- a/examples/computer_invitations/DeleteComputerInvitationByID/DeleteComputerInvitationByID.go +++ b/examples/computer_invitations/DeleteComputerInvitationByID/DeleteComputerInvitationByID.go @@ -19,7 +19,7 @@ func main() { } // The ID of the computer invitation you wish to delete. - invitationID := 123 // Replace with the actual ID. + invitationID := "1" // Replace with the actual ID. // Call the function to delete the computer invitation by ID. err = client.DeleteComputerInvitationByID(invitationID) diff --git a/examples/computer_invitations/GetComputerInvitationByID/GetComputerInvitationByID.go b/examples/computer_invitations/GetComputerInvitationByID/GetComputerInvitationByID.go index 1554628d..24aa2c7a 100644 --- a/examples/computer_invitations/GetComputerInvitationByID/GetComputerInvitationByID.go +++ b/examples/computer_invitations/GetComputerInvitationByID/GetComputerInvitationByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - invitationID := 1 // Replace with the actual invitation ID you want to retrieve + invitationID := "1" // Replace with the actual invitation ID you want to retrieve invitation, err := client.GetComputerInvitationByID(invitationID) if err != nil { diff --git a/examples/computer_invitations/GetComputerInvitationsByInvitationID/GetComputerInvitationsByInvitationID.go b/examples/computer_invitations/GetComputerInvitationsByInvitationID/GetComputerInvitationsByInvitationID.go index fd63816a..d89549cc 100644 --- a/examples/computer_invitations/GetComputerInvitationsByInvitationID/GetComputerInvitationsByInvitationID.go +++ b/examples/computer_invitations/GetComputerInvitationsByInvitationID/GetComputerInvitationsByInvitationID.go @@ -18,7 +18,7 @@ func main() { } // Replace with the actual invitation ID you want to fetch - invitationID := 6 + invitationID := "1" invitation, err := client.GetComputerInvitationByInvitationID(invitationID) if err != nil { diff --git a/examples/computers/DeleteComputerByID/DeleteComputerByID.go b/examples/computers/DeleteComputerByID/DeleteComputerByID.go index 6ef42a19..87bcce3c 100644 --- a/examples/computers/DeleteComputerByID/DeleteComputerByID.go +++ b/examples/computers/DeleteComputerByID/DeleteComputerByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - computerID := 6 // Replace with actual computer ID + computerID := "1" // Replace with actual computer ID err = client.DeleteComputerByID(computerID) if err != nil { diff --git a/examples/computers/GetComputerByID/GetComputerByID.go b/examples/computers/GetComputerByID/GetComputerByID.go index 9d846b1e..3608dc47 100644 --- a/examples/computers/GetComputerByID/GetComputerByID.go +++ b/examples/computers/GetComputerByID/GetComputerByID.go @@ -19,7 +19,7 @@ func main() { } // Define the computer ID you want to retrieve - computerID := 21 // Replace with the actual ID of the computer + computerID := "1" // Replace with the actual ID of the computer // Call GetComputerByID function computer, err := client.GetComputerByID(computerID) diff --git a/examples/computers/UpdateComputerByID/UpdateComputerByID.go b/examples/computers/UpdateComputerByID/UpdateComputerByID.go index 701e044e..a207e6b6 100644 --- a/examples/computers/UpdateComputerByID/UpdateComputerByID.go +++ b/examples/computers/UpdateComputerByID/UpdateComputerByID.go @@ -19,7 +19,7 @@ func main() { } // Define the computer ID to update - computerID := 6 // Replace with actual computer ID + computerID := "1" // Replace with actual computer ID // Define the computer configuration to be updated updatedComputer := jamfpro.ResponseComputer{ diff --git a/examples/directory_bindings/DeleteDirectoryBindingByID/DeleteDirectoryBindingByID.go b/examples/directory_bindings/DeleteDirectoryBindingByID/DeleteDirectoryBindingByID.go index 47e26128..b5985d2f 100644 --- a/examples/directory_bindings/DeleteDirectoryBindingByID/DeleteDirectoryBindingByID.go +++ b/examples/directory_bindings/DeleteDirectoryBindingByID/DeleteDirectoryBindingByID.go @@ -18,7 +18,7 @@ func main() { } // Example ID of the directory binding to delete - bindingID := 1 // Assuming an existing binding ID + bindingID := "1" // Assuming an existing binding ID // Delete directory binding by ID err = client.DeleteDirectoryBindingByID(bindingID) diff --git a/examples/directory_bindings/GetDirectoryBindingByID/GetDirectoryBindingByID.go b/examples/directory_bindings/GetDirectoryBindingByID/GetDirectoryBindingByID.go index ff087920..be8649bc 100644 --- a/examples/directory_bindings/GetDirectoryBindingByID/GetDirectoryBindingByID.go +++ b/examples/directory_bindings/GetDirectoryBindingByID/GetDirectoryBindingByID.go @@ -19,7 +19,7 @@ func main() { } // Example ID of the directory binding to fetch - bindingID := 1 + bindingID := "1" // Fetch directory binding by ID binding, err := client.GetDirectoryBindingByID(bindingID) diff --git a/examples/directory_bindings/UpdateDirectoryBindingByID/UpdateDirectoryBindingByID.go b/examples/directory_bindings/UpdateDirectoryBindingByID/UpdateDirectoryBindingByID.go index d38298b5..a9a6e011 100644 --- a/examples/directory_bindings/UpdateDirectoryBindingByID/UpdateDirectoryBindingByID.go +++ b/examples/directory_bindings/UpdateDirectoryBindingByID/UpdateDirectoryBindingByID.go @@ -30,7 +30,7 @@ func main() { } // Update directory binding by ID - bindingID := 1 // Assuming an existing binding ID + bindingID := "1" // Assuming an existing binding ID updatedBindingByID, err := client.UpdateDirectoryBindingByID(bindingID, updateBinding) if err != nil { fmt.Println("Error updating directory binding by ID:", err) diff --git a/examples/disk_encryption_configurations/DeleteDiskEncryptionConfigurationByID/DeleteDiskEncryptionConfigurationByID.go b/examples/disk_encryption_configurations/DeleteDiskEncryptionConfigurationByID/DeleteDiskEncryptionConfigurationByID.go index a58b8a81..f0dd53eb 100644 --- a/examples/disk_encryption_configurations/DeleteDiskEncryptionConfigurationByID/DeleteDiskEncryptionConfigurationByID.go +++ b/examples/disk_encryption_configurations/DeleteDiskEncryptionConfigurationByID/DeleteDiskEncryptionConfigurationByID.go @@ -16,7 +16,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - err = client.DeleteDiskEncryptionConfigurationByID(1) + err = client.DeleteDiskEncryptionConfigurationByID("1") if err != nil { log.Fatalf("Error deleting Disk Encryption Configuration by ID: %v", err) } diff --git a/examples/disk_encryption_configurations/GetDiskEncryptionConfigurationByID/GetDiskEncryptionConfigurationByID.go b/examples/disk_encryption_configurations/GetDiskEncryptionConfigurationByID/GetDiskEncryptionConfigurationByID.go index 47b0bf5e..86b466f9 100644 --- a/examples/disk_encryption_configurations/GetDiskEncryptionConfigurationByID/GetDiskEncryptionConfigurationByID.go +++ b/examples/disk_encryption_configurations/GetDiskEncryptionConfigurationByID/GetDiskEncryptionConfigurationByID.go @@ -19,7 +19,7 @@ func main() { } // Let's assume you want to get the disk encryption configuration with ID 1 - configID := 36 + configID := "1" configuration, err := client.GetDiskEncryptionConfigurationByID(configID) if err != nil { diff --git a/examples/disk_encryption_configurations/UpdateDiskEncryptionConfigurationByIDIndividualRecoveryKey/UpdateDiskEncryptionConfigurationByIDIndividualRecoveryKey.go b/examples/disk_encryption_configurations/UpdateDiskEncryptionConfigurationByIDIndividualRecoveryKey/UpdateDiskEncryptionConfigurationByIDIndividualRecoveryKey.go index 4df8d1fd..50f1562d 100644 --- a/examples/disk_encryption_configurations/UpdateDiskEncryptionConfigurationByIDIndividualRecoveryKey/UpdateDiskEncryptionConfigurationByIDIndividualRecoveryKey.go +++ b/examples/disk_encryption_configurations/UpdateDiskEncryptionConfigurationByIDIndividualRecoveryKey/UpdateDiskEncryptionConfigurationByIDIndividualRecoveryKey.go @@ -24,7 +24,7 @@ func main() { FileVaultEnabledUsers: "Management Account", } - updatedConfig, err := client.UpdateDiskEncryptionConfigurationByID(1, configToUpdate) + updatedConfig, err := client.UpdateDiskEncryptionConfigurationByID("1", configToUpdate) if err != nil { log.Fatalf("Error updating Disk Encryption Configuration by ID: %v", err) } diff --git a/examples/dock_items/DeleteAllDockItems/DeleteAllDockItems.go b/examples/dock_items/DeleteAllDockItems/DeleteAllDockItems.go index f91ff767..de15b2bb 100644 --- a/examples/dock_items/DeleteAllDockItems/DeleteAllDockItems.go +++ b/examples/dock_items/DeleteAllDockItems/DeleteAllDockItems.go @@ -3,6 +3,7 @@ package main import ( "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -29,7 +30,7 @@ func main() { for _, dockItem := range dockItems.DockItems { fmt.Printf("Deleting dock item ID: %d, Name: %s\n", dockItem.ID, dockItem.Name) - err = client.DeleteDockItemByID(dockItem.ID) + err = client.DeleteDockItemByID(strconv.Itoa(dockItem.ID)) if err != nil { log.Printf("Error deleting dock item ID %d: %v\n", dockItem.ID, err) continue // Move to the next dock item if there's an error diff --git a/examples/dock_items/DeleteDockItemsByID/DeleteDockItemsByID.go b/examples/dock_items/DeleteDockItemsByID/DeleteDockItemsByID.go index f5616afd..b06c5a5f 100644 --- a/examples/dock_items/DeleteDockItemsByID/DeleteDockItemsByID.go +++ b/examples/dock_items/DeleteDockItemsByID/DeleteDockItemsByID.go @@ -18,7 +18,7 @@ func main() { } // Define the ID of the dock item to delete - dockItemID := 505 // Replace with the actual ID + dockItemID := "1" // Replace with the actual ID // Call the DeleteDockItemsByID function err = client.DeleteDockItemByID(dockItemID) diff --git a/examples/dock_items/GetDockItemsByID/GetDockItemsByID.go b/examples/dock_items/GetDockItemsByID/GetDockItemsByID.go index e7894bd1..39d0cedb 100644 --- a/examples/dock_items/GetDockItemsByID/GetDockItemsByID.go +++ b/examples/dock_items/GetDockItemsByID/GetDockItemsByID.go @@ -19,7 +19,7 @@ func main() { } // Define the ID of the dock item to retrieve - dockItemID := 9999999999 // Replace with the actual ID of the dock item + dockItemID := "1" // Replace with the actual ID of the dock item // Call the GetDockItemsByID function dockItem, err := client.GetDockItemByID(dockItemID) diff --git a/examples/dock_items/UpdateDockItemsByID/UpdateDockItemByID.go b/examples/dock_items/UpdateDockItemsByID/UpdateDockItemByID.go index d36726bd..2994ea07 100644 --- a/examples/dock_items/UpdateDockItemsByID/UpdateDockItemByID.go +++ b/examples/dock_items/UpdateDockItemsByID/UpdateDockItemByID.go @@ -19,7 +19,7 @@ func main() { } // Define the ID and details of the dock item to update - dockItemID := 1 // Replace with the actual ID + dockItemID := "1" // Replace with the actual ID updatedDockItem := &jamfpro.ResourceDockItem{ // Set the fields you want to update Name: "Updated Safari", diff --git a/examples/ebooks/DeleteEbookByID/DeleteEbookByID.go b/examples/ebooks/DeleteEbookByID/DeleteEbookByID.go index 46c030c3..b55efe9f 100644 --- a/examples/ebooks/DeleteEbookByID/DeleteEbookByID.go +++ b/examples/ebooks/DeleteEbookByID/DeleteEbookByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - ebookID := 1 // Replace with the actual eBook ID + ebookID := "1" // Replace with the actual eBook ID err = client.DeleteEbookByID(ebookID) if err != nil { diff --git a/examples/ebooks/GetEbooksByID/GetEbooksByID.go b/examples/ebooks/GetEbooksByID/GetEbooksByID.go index 55926717..2839bbae 100644 --- a/examples/ebooks/GetEbooksByID/GetEbooksByID.go +++ b/examples/ebooks/GetEbooksByID/GetEbooksByID.go @@ -19,7 +19,7 @@ func main() { } // Define the department ID you want to retrieve - eBooksID := 1 // Replace with the desired department ID + eBooksID := "1" // Replace with the desired department ID // Call GetEbooksByID function ebook, err := client.GetEbookByID(eBooksID) diff --git a/examples/ebooks/UpdateEbookByID/UpdateEbookByID.go b/examples/ebooks/UpdateEbookByID/UpdateEbookByID.go index 81b37de7..58aff144 100644 --- a/examples/ebooks/UpdateEbookByID/UpdateEbookByID.go +++ b/examples/ebooks/UpdateEbookByID/UpdateEbookByID.go @@ -19,7 +19,7 @@ func main() { } // Define the ebook to be created - ebookID := 1 // Replace with the actual eBook ID + ebookID := "1" // Replace with the actual eBook ID ebookToUpdate := jamfpro.ResourceEbooks{ General: jamfpro.EbookSubsetGeneral{ Name: "iPhone User Guide for iOS 10.3", diff --git a/examples/file_share_distribution_points/DeleteFileShareDistributionPointByID/DeleteFileShareDistributionPointByID.go b/examples/file_share_distribution_points/DeleteFileShareDistributionPointByID/DeleteFileShareDistributionPointByID.go index 5299bbac..5eb14cdc 100644 --- a/examples/file_share_distribution_points/DeleteFileShareDistributionPointByID/DeleteFileShareDistributionPointByID.go +++ b/examples/file_share_distribution_points/DeleteFileShareDistributionPointByID/DeleteFileShareDistributionPointByID.go @@ -18,7 +18,7 @@ func main() { } // ID of the distribution point to delete - distributionPointID := 1 // Replace with the actual ID + distributionPointID := "1" // Replace with the actual ID // Call DeleteDistributionPointByID function err = client.DeleteDistributionPointByID(distributionPointID) diff --git a/examples/file_share_distribution_points/GetFileShareDistributionPointByID/GetFileShareDistributionPointByID.go b/examples/file_share_distribution_points/GetFileShareDistributionPointByID/GetFileShareDistributionPointByID.go index cad802e5..e84edfa0 100644 --- a/examples/file_share_distribution_points/GetFileShareDistributionPointByID/GetFileShareDistributionPointByID.go +++ b/examples/file_share_distribution_points/GetFileShareDistributionPointByID/GetFileShareDistributionPointByID.go @@ -19,7 +19,7 @@ func main() { } // ID of the distribution point to fetch - distributionPointID := 5 // Replace with actual ID + distributionPointID := "1" // Replace with actual ID // Call GetDistributionPointByID function distributionPoint, err := client.GetDistributionPointByID(distributionPointID) diff --git a/examples/file_share_distribution_points/UpdateFileShareDistributionPointByID/UpdateFileShareDistributionPointByID.go b/examples/file_share_distribution_points/UpdateFileShareDistributionPointByID/UpdateFileShareDistributionPointByID.go index 23e8549f..ab793a63 100644 --- a/examples/file_share_distribution_points/UpdateFileShareDistributionPointByID/UpdateFileShareDistributionPointByID.go +++ b/examples/file_share_distribution_points/UpdateFileShareDistributionPointByID/UpdateFileShareDistributionPointByID.go @@ -46,7 +46,7 @@ func main() { } // ID of the distribution point to update - distributionPointID := 1 // Replace with the actual ID + distributionPointID := "1" // Replace with the actual ID // Call UpdateDistributionPointByID function updatedDistributionPoint, err := client.UpdateDistributionPointByID(distributionPointID, &updateDistributionPoint) diff --git a/examples/ibeacons/DeleteIBeaconByID/DeleteIBeaconByID.go b/examples/ibeacons/DeleteIBeaconByID/DeleteIBeaconByID.go index 9d2691aa..0d54a8d4 100644 --- a/examples/ibeacons/DeleteIBeaconByID/DeleteIBeaconByID.go +++ b/examples/ibeacons/DeleteIBeaconByID/DeleteIBeaconByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - iBeaconID := 1 // Replace with the actual iBeacon ID + iBeaconID := "1" // Replace with the actual iBeacon ID err = client.DeleteIBeaconByID(iBeaconID) if err != nil { diff --git a/examples/ibeacons/GetIBeaconByID/GetIBeaconByID.go b/examples/ibeacons/GetIBeaconByID/GetIBeaconByID.go index ee003a46..4f9feca1 100644 --- a/examples/ibeacons/GetIBeaconByID/GetIBeaconByID.go +++ b/examples/ibeacons/GetIBeaconByID/GetIBeaconByID.go @@ -19,7 +19,7 @@ func main() { } // Replace with the actual ID - beaconID := 1 + beaconID := "1" iBeacon, err := client.GetIBeaconByID(beaconID) if err != nil { diff --git a/examples/ibeacons/UpdateIBeaconByID/UpdateIBeaconByID.go b/examples/ibeacons/UpdateIBeaconByID/UpdateIBeaconByID.go index b6f7edc2..82ae7c52 100644 --- a/examples/ibeacons/UpdateIBeaconByID/UpdateIBeaconByID.go +++ b/examples/ibeacons/UpdateIBeaconByID/UpdateIBeaconByID.go @@ -25,7 +25,7 @@ func main() { Minor: -1, } - result, err := client.UpdateIBeaconByID(1, updatedBeacon) + result, err := client.UpdateIBeaconByID("1", updatedBeacon) if err != nil { log.Fatalf("Error updating iBeacon: %v", err) } diff --git a/examples/icon/DownloadIcon/DownloadIcon.go b/examples/icon/DownloadIcon/DownloadIcon.go index 885f101a..95f4e9d0 100644 --- a/examples/icon/DownloadIcon/DownloadIcon.go +++ b/examples/icon/DownloadIcon/DownloadIcon.go @@ -18,7 +18,7 @@ func main() { } // Set the icon ID to download - iconID := 2 // Replace with your actual icon ID + iconID := "1" // Replace with your actual icon ID // Set the path where the icon should be saved savePath := "/Users/dafyddwatkins/Downloads/saved-icon.png" // Replace with the actual path where you want to save the icon diff --git a/examples/jamf_api_integrations/DeleteApiIntegrationByID/DeleteApiIntegrationByID.go b/examples/jamf_api_integrations/DeleteApiIntegrationByID/DeleteApiIntegrationByID.go index 4e02680f..e44a5711 100644 --- a/examples/jamf_api_integrations/DeleteApiIntegrationByID/DeleteApiIntegrationByID.go +++ b/examples/jamf_api_integrations/DeleteApiIntegrationByID/DeleteApiIntegrationByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - integrationID := 1 // Replace with the actual API Integration ID + integrationID := "1" // Replace with the actual API Integration ID if err := client.DeleteApiIntegrationByID(integrationID); err != nil { fmt.Println("Error deleting API Integration:", err) diff --git a/examples/jamf_api_integrations/GetApiIntegrationByID/GetApiIntegrationByID.go b/examples/jamf_api_integrations/GetApiIntegrationByID/GetApiIntegrationByID.go index 06790f52..f7e93b7f 100644 --- a/examples/jamf_api_integrations/GetApiIntegrationByID/GetApiIntegrationByID.go +++ b/examples/jamf_api_integrations/GetApiIntegrationByID/GetApiIntegrationByID.go @@ -18,7 +18,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - integrationID := 1 + integrationID := "1" // Call GetApiIntegrationByID function with an integer ID integration, err := client.GetApiIntegrationByID(integrationID) diff --git a/examples/jamf_api_integrations/UpdateApiIntegrationByID/UpdateApiIntegrationByID.go b/examples/jamf_api_integrations/UpdateApiIntegrationByID/UpdateApiIntegrationByID.go index b05b4e80..fec78180 100644 --- a/examples/jamf_api_integrations/UpdateApiIntegrationByID/UpdateApiIntegrationByID.go +++ b/examples/jamf_api_integrations/UpdateApiIntegrationByID/UpdateApiIntegrationByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - apiIntegrationID := 1 // Replace with the actual API Integration ID + apiIntegrationID := "1" // Replace with the actual API Integration ID // Create an instance of the ApiIntegration with updated values integrationUpdate := &jamfpro.ResourceApiIntegration{ diff --git a/examples/ldap_servers/DeleteLDAPServerByID/DeleteLDAPServerByID.go b/examples/ldap_servers/DeleteLDAPServerByID/DeleteLDAPServerByID.go index 4c146e8b..39a75fcc 100644 --- a/examples/ldap_servers/DeleteLDAPServerByID/DeleteLDAPServerByID.go +++ b/examples/ldap_servers/DeleteLDAPServerByID/DeleteLDAPServerByID.go @@ -18,7 +18,7 @@ func main() { } // Delete LDAP server by ID - id := 1 // Replace with actual LDAP server ID + id := "1" // Replace with actual LDAP server ID err = client.DeleteLDAPServerByID(id) if err != nil { log.Fatalf("Error deleting LDAP server by ID: %v", err) diff --git a/examples/ldap_servers/GetLDAPServerByID/GetLDAPServerByID.go b/examples/ldap_servers/GetLDAPServerByID/GetLDAPServerByID.go index 3d087891..4b4dd444 100644 --- a/examples/ldap_servers/GetLDAPServerByID/GetLDAPServerByID.go +++ b/examples/ldap_servers/GetLDAPServerByID/GetLDAPServerByID.go @@ -19,7 +19,7 @@ func main() { } // Call the GetLDAPServerByID function - id := 1 // Replace with actual LDAP server ID + id := "1" // Replace with actual LDAP server ID ldapServer, err := client.GetLDAPServerByID(id) if err != nil { log.Fatalf("Error retrieving LDAP server by ID: %v", err) diff --git a/examples/ldap_servers/GetLDAPServerByIDAndGroupDataSubset/GetLDAPServerByIDAndGroupDataSubset.go b/examples/ldap_servers/GetLDAPServerByIDAndGroupDataSubset/GetLDAPServerByIDAndGroupDataSubset.go index 524cdba7..06e43d4d 100644 --- a/examples/ldap_servers/GetLDAPServerByIDAndGroupDataSubset/GetLDAPServerByIDAndGroupDataSubset.go +++ b/examples/ldap_servers/GetLDAPServerByIDAndGroupDataSubset/GetLDAPServerByIDAndGroupDataSubset.go @@ -19,7 +19,7 @@ func main() { } // Fetch LDAP server group details by ID - ldapServerID := 1 // Replace with actual ID + ldapServerID := "1" // Replace with actual ID group := "exampleGroup" ldapServer, err := client.GetLDAPServerByIDAndGroupDataSubset(ldapServerID, group) if err != nil { diff --git a/examples/ldap_servers/GetLDAPServerByIDAndUserDataSubset/GetLDAPServerByIDAndUserDataSubset.go b/examples/ldap_servers/GetLDAPServerByIDAndUserDataSubset/GetLDAPServerByIDAndUserDataSubset.go index 44a698de..1201840e 100644 --- a/examples/ldap_servers/GetLDAPServerByIDAndUserDataSubset/GetLDAPServerByIDAndUserDataSubset.go +++ b/examples/ldap_servers/GetLDAPServerByIDAndUserDataSubset/GetLDAPServerByIDAndUserDataSubset.go @@ -19,7 +19,7 @@ func main() { } // Fetch LDAP server details by ID and user data subset - ldapServerID := 1 // Replace with actual ID + ldapServerID := "1" // Replace with actual ID user := "exampleUser" ldapServer, err := client.GetLDAPServerByIDAndUserDataSubset(ldapServerID, user) if err != nil { diff --git a/examples/ldap_servers/GetLDAPServerByIDAndUserMembershipInGroupDataSubset/GetLDAPServerByIDAndUserMembershipInGroupDataSubset.go b/examples/ldap_servers/GetLDAPServerByIDAndUserMembershipInGroupDataSubset/GetLDAPServerByIDAndUserMembershipInGroupDataSubset.go index 0f339466..42a334e2 100644 --- a/examples/ldap_servers/GetLDAPServerByIDAndUserMembershipInGroupDataSubset/GetLDAPServerByIDAndUserMembershipInGroupDataSubset.go +++ b/examples/ldap_servers/GetLDAPServerByIDAndUserMembershipInGroupDataSubset/GetLDAPServerByIDAndUserMembershipInGroupDataSubset.go @@ -19,7 +19,7 @@ func main() { } // Call the GetLDAPServerByIDAndUserMembershipInGroupDataSubset function - ldapServerID := 1 // Replace with actual LDAP server ID + ldapServerID := "1" // Replace with actual LDAP server ID group := "exampleGroup" user := "exampleUser1,exampleUser2" // Multiple users separated by a comma ldapServer, err := client.GetLDAPServerByIDAndUserMembershipInGroupDataSubset(ldapServerID, group, user) diff --git a/examples/ldap_servers/UpdateLDAPServerByID/UpdateLDAPServerByID.go b/examples/ldap_servers/UpdateLDAPServerByID/UpdateLDAPServerByID.go index 0f31e371..501c58bf 100644 --- a/examples/ldap_servers/UpdateLDAPServerByID/UpdateLDAPServerByID.go +++ b/examples/ldap_servers/UpdateLDAPServerByID/UpdateLDAPServerByID.go @@ -88,7 +88,7 @@ func main() { } // Update LDAP server by ID - id := 1 // Replace with actual LDAP server ID + id := "1" // Replace with actual LDAP server ID updatedServer, err := client.UpdateLDAPServerByID(id, updatedLDAPServer) if err != nil { log.Fatalf("Error updating LDAP server by ID: %v", err) diff --git a/examples/licensed_software/DeleteLicensedSoftwareByID/DeleteLicensedSoftwareByID.go b/examples/licensed_software/DeleteLicensedSoftwareByID/DeleteLicensedSoftwareByID.go index f1479288..4bff6528 100644 --- a/examples/licensed_software/DeleteLicensedSoftwareByID/DeleteLicensedSoftwareByID.go +++ b/examples/licensed_software/DeleteLicensedSoftwareByID/DeleteLicensedSoftwareByID.go @@ -16,7 +16,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - licensedSoftwareID := 1 // Set your ID here + licensedSoftwareID := "1" // Set your ID here // Delete licensed software by ID err = client.DeleteLicensedSoftwareByID(licensedSoftwareID) diff --git a/examples/licensed_software/GetLicensedSoftwareByID/GetLicensedSoftwareByID.go b/examples/licensed_software/GetLicensedSoftwareByID/GetLicensedSoftwareByID.go index cce8ba34..1e84e5b0 100644 --- a/examples/licensed_software/GetLicensedSoftwareByID/GetLicensedSoftwareByID.go +++ b/examples/licensed_software/GetLicensedSoftwareByID/GetLicensedSoftwareByID.go @@ -19,7 +19,7 @@ func main() { } // ID of the licensed software to fetch - softwareID := 1 // Replace with actual ID + softwareID := "1" // Replace with actual ID licensedSoftware, err := client.GetLicensedSoftwareByID(softwareID) if err != nil { diff --git a/examples/licensed_software/UpdateLicensedSoftwareByID/UpdateLicensedSoftwareByID.go b/examples/licensed_software/UpdateLicensedSoftwareByID/UpdateLicensedSoftwareByID.go index 848b1f3b..784c6c5d 100644 --- a/examples/licensed_software/UpdateLicensedSoftwareByID/UpdateLicensedSoftwareByID.go +++ b/examples/licensed_software/UpdateLicensedSoftwareByID/UpdateLicensedSoftwareByID.go @@ -90,7 +90,7 @@ func main() { } // Update the licensed software by ID - updatedLicensedSoftware, err := client.UpdateLicensedSoftwareByID(1, licensedSoftware) + updatedLicensedSoftware, err := client.UpdateLicensedSoftwareByID("1", licensedSoftware) if err != nil { log.Fatalf("Error updating licensed software by ID: %v", err) } diff --git a/examples/mac_applications/DeleteMacApplicationByID/DeleteMacApplicationByID.go b/examples/mac_applications/DeleteMacApplicationByID/DeleteMacApplicationByID.go index 171a69cf..38c1b535 100644 --- a/examples/mac_applications/DeleteMacApplicationByID/DeleteMacApplicationByID.go +++ b/examples/mac_applications/DeleteMacApplicationByID/DeleteMacApplicationByID.go @@ -18,7 +18,7 @@ func main() { } // Define the ID of the VPP mac application you want to delete - profileID := 1 + profileID := "1" // Call the DeleteMacOSConfigurationProfileByID function err = client.DeleteMacApplicationByID(profileID) diff --git a/examples/mac_applications/GetMacApplicationByID/GetMacApplicationByID.go b/examples/mac_applications/GetMacApplicationByID/GetMacApplicationByID.go index 7f309b55..6cb9b0f8 100644 --- a/examples/mac_applications/GetMacApplicationByID/GetMacApplicationByID.go +++ b/examples/mac_applications/GetMacApplicationByID/GetMacApplicationByID.go @@ -18,7 +18,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - id := 1 // Replace with your Mac application ID + id := "1" // Replace with your Mac application ID macApp, err := client.GetMacApplicationByID(id) if err != nil { log.Fatalf("Error fetching Mac Application by ID: %v", err) diff --git a/examples/mac_applications/GetMacApplicationByIDAndDataSubset/GetMacApplicationByIDAndDataSubset.go b/examples/mac_applications/GetMacApplicationByIDAndDataSubset/GetMacApplicationByIDAndDataSubset.go index a8c5bd16..44838fd4 100644 --- a/examples/mac_applications/GetMacApplicationByIDAndDataSubset/GetMacApplicationByIDAndDataSubset.go +++ b/examples/mac_applications/GetMacApplicationByIDAndDataSubset/GetMacApplicationByIDAndDataSubset.go @@ -19,7 +19,7 @@ func main() { } // Define the application name and the subset you want to retrieve - appID := 1 // Replace with the actual application name + appID := "1" // Replace with the actual application name subset := "General" // Subset values can be General, Scope, SelfService, VPPCodes and VPP. // Call GetMacApplicationByNameAndDataSubset diff --git a/examples/mac_applications/UpdateMacApplicationByID/UpdateMacApplicationByID.go b/examples/mac_applications/UpdateMacApplicationByID/UpdateMacApplicationByID.go index 90b6e43b..02a10e08 100644 --- a/examples/mac_applications/UpdateMacApplicationByID/UpdateMacApplicationByID.go +++ b/examples/mac_applications/UpdateMacApplicationByID/UpdateMacApplicationByID.go @@ -50,10 +50,10 @@ func main() { }, } - macAppId := 1 // Replace with your Mac application ID + macAppID := "1" // Replace with your Mac application ID // Call UpdateMacApplicationByID - updatedMacApp, err := client.UpdateMacApplicationByID(macAppId, updateMacApp) // Replace 123 with the actual ID + updatedMacApp, err := client.UpdateMacApplicationByID(macAppID, updateMacApp) // Replace 123 with the actual ID if err != nil { log.Fatalf("Error updating Mac Application by ID: %v", err) } diff --git a/examples/macos_configuration_profiles/DeleteAllMacOSConfigurationProfiles/DeleteAllMacOSConfigurationProfiles.go b/examples/macos_configuration_profiles/DeleteAllMacOSConfigurationProfiles/DeleteAllMacOSConfigurationProfiles.go index 53810797..757efcd0 100644 --- a/examples/macos_configuration_profiles/DeleteAllMacOSConfigurationProfiles/DeleteAllMacOSConfigurationProfiles.go +++ b/examples/macos_configuration_profiles/DeleteAllMacOSConfigurationProfiles/DeleteAllMacOSConfigurationProfiles.go @@ -3,6 +3,7 @@ package main import ( "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -29,7 +30,7 @@ func main() { for _, extAtt := range extAtts.Results { fmt.Printf("Deleting macOS configuration profile ID: %d, Name: %s\n", extAtt.ID, extAtt.Name) - err = client.DeleteMacOSConfigurationProfileByID(extAtt.ID) + err = client.DeleteMacOSConfigurationProfileByID(strconv.Itoa(extAtt.ID)) if err != nil { log.Printf("Error deleting macOS configuration profile ID %d: %v\n", extAtt.ID, err) continue // Move to the next macOS configuration profile if there's an error diff --git a/examples/macos_configuration_profiles/DeleteMacOSConfigurationProfileByID/DeleteMacOSConfigurationProfileByID.go b/examples/macos_configuration_profiles/DeleteMacOSConfigurationProfileByID/DeleteMacOSConfigurationProfileByID.go index deaed6ab..f435a0c0 100644 --- a/examples/macos_configuration_profiles/DeleteMacOSConfigurationProfileByID/DeleteMacOSConfigurationProfileByID.go +++ b/examples/macos_configuration_profiles/DeleteMacOSConfigurationProfileByID/DeleteMacOSConfigurationProfileByID.go @@ -18,7 +18,7 @@ func main() { } // Define the ID of the macOS Configuration Profile you want to delete - profileID := 78 + profileID := "1" // Call the DeleteMacOSConfigurationProfileByID function err = client.DeleteMacOSConfigurationProfileByID(profileID) diff --git a/examples/macos_configuration_profiles/GetMacOSConfigurationProfileByID/GetMacOSConfigurationProfileByID.go b/examples/macos_configuration_profiles/GetMacOSConfigurationProfileByID/GetMacOSConfigurationProfileByID.go index 399aedd3..98fc9611 100644 --- a/examples/macos_configuration_profiles/GetMacOSConfigurationProfileByID/GetMacOSConfigurationProfileByID.go +++ b/examples/macos_configuration_profiles/GetMacOSConfigurationProfileByID/GetMacOSConfigurationProfileByID.go @@ -18,7 +18,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - profileID := 3062 + profileID := "1" // Call GetMacOSConfigurationProfileByID function profile, err := client.GetMacOSConfigurationProfileByID(profileID) diff --git a/examples/macos_configuration_profiles/UpdateMacOSConfigurationProfileByID/UpdateMacOSConfigurationProfileByID.go b/examples/macos_configuration_profiles/UpdateMacOSConfigurationProfileByID/UpdateMacOSConfigurationProfileByID.go index 357dc94a..a591e60a 100644 --- a/examples/macos_configuration_profiles/UpdateMacOSConfigurationProfileByID/UpdateMacOSConfigurationProfileByID.go +++ b/examples/macos_configuration_profiles/UpdateMacOSConfigurationProfileByID/UpdateMacOSConfigurationProfileByID.go @@ -47,7 +47,7 @@ func main() { } // Set the config profile ID you want to update - id := 153 // Replace with the actual ID of the profile you want to update + id := "1" // Replace with the actual ID of the profile you want to update // Call the UpdateMacOSConfigurationProfileByID function updatedProfileID, err := client.UpdateMacOSConfigurationProfileByID(id, &profile) diff --git a/examples/macos_configuration_profiles/UpdateMacOSConfigurationProfileByIDWithFileUpload/UpdateMacOSConfigurationProfileByIDWithFileUpload.go b/examples/macos_configuration_profiles/UpdateMacOSConfigurationProfileByIDWithFileUpload/UpdateMacOSConfigurationProfileByIDWithFileUpload.go index 3eb77568..03bbd7c6 100644 --- a/examples/macos_configuration_profiles/UpdateMacOSConfigurationProfileByIDWithFileUpload/UpdateMacOSConfigurationProfileByIDWithFileUpload.go +++ b/examples/macos_configuration_profiles/UpdateMacOSConfigurationProfileByIDWithFileUpload/UpdateMacOSConfigurationProfileByIDWithFileUpload.go @@ -51,7 +51,7 @@ func main() { } // Set the config profile ID you want to update - id := 153 // Replace with the actual ID of the profile you want to update + id := "1" // Replace with the actual ID of the profile you want to update // Call the UpdateMacOSConfigurationProfileByID function updatedProfileID, err := client.UpdateMacOSConfigurationProfileByID(id, &profile) diff --git a/examples/mobile_device_applications/DeleteMobileDeviceApplicationpByID/DeleteMobileDeviceApplicationpByID.go b/examples/mobile_device_applications/DeleteMobileDeviceApplicationpByID/DeleteMobileDeviceApplicationpByID.go index 9950610d..9114c02e 100644 --- a/examples/mobile_device_applications/DeleteMobileDeviceApplicationpByID/DeleteMobileDeviceApplicationpByID.go +++ b/examples/mobile_device_applications/DeleteMobileDeviceApplicationpByID/DeleteMobileDeviceApplicationpByID.go @@ -18,7 +18,7 @@ func main() { } // Define the ID of the mobile device application you want to delete - appID := 3 // Replace with the actual ID of the application you want to delete + appID := "1" // Replace with the actual ID of the application you want to delete // Perform the deletion err = client.DeleteMobileDeviceApplicationpByID(appID) diff --git a/examples/mobile_device_applications/GetMobileDeviceApplicationByID/GetMobileDeviceApplicationByID.go b/examples/mobile_device_applications/GetMobileDeviceApplicationByID/GetMobileDeviceApplicationByID.go index e6ac81d2..ba8a6932 100644 --- a/examples/mobile_device_applications/GetMobileDeviceApplicationByID/GetMobileDeviceApplicationByID.go +++ b/examples/mobile_device_applications/GetMobileDeviceApplicationByID/GetMobileDeviceApplicationByID.go @@ -19,7 +19,7 @@ func main() { } // Fetch a mobile device application by ID - appByID, err := client.GetMobileDeviceApplicationByID(5) // replace 123 with an actual ID + appByID, err := client.GetMobileDeviceApplicationByID("5") // replace 123 with an actual ID if err != nil { fmt.Println("Error fetching by ID:", err) } else { diff --git a/examples/mobile_device_applications/GetMobileDeviceApplicationByIDAndDataSubset/GetMobileDeviceApplicationByIDAndDataSubset.go b/examples/mobile_device_applications/GetMobileDeviceApplicationByIDAndDataSubset/GetMobileDeviceApplicationByIDAndDataSubset.go index 04900b20..6d030022 100644 --- a/examples/mobile_device_applications/GetMobileDeviceApplicationByIDAndDataSubset/GetMobileDeviceApplicationByIDAndDataSubset.go +++ b/examples/mobile_device_applications/GetMobileDeviceApplicationByIDAndDataSubset/GetMobileDeviceApplicationByIDAndDataSubset.go @@ -18,7 +18,7 @@ func main() { } // Replace "123" with an actual ID and "subset" with the desired data subset - id := 123 + id := "1" subset := "General" // General / Scope / Selfservice / VPPCodes / VPP / AppConfiguration app, err := client.GetMobileDeviceApplicationByIDAndDataSubset(id, subset) diff --git a/examples/mobile_device_applications/UpdateMobileDeviceApplicationByID/UpdateMobileDeviceApplicationByID.go b/examples/mobile_device_applications/UpdateMobileDeviceApplicationByID/UpdateMobileDeviceApplicationByID.go index 8e8f2687..156c3aa1 100644 --- a/examples/mobile_device_applications/UpdateMobileDeviceApplicationByID/UpdateMobileDeviceApplicationByID.go +++ b/examples/mobile_device_applications/UpdateMobileDeviceApplicationByID/UpdateMobileDeviceApplicationByID.go @@ -46,7 +46,7 @@ func main() { }, } - updateAppID := 123 // Replace 123 with the actual ID + updateAppID := "1" // Replace 123 with the actual ID updatedApp, err := client.UpdateMobileDeviceApplicationByID(updateAppID, updateApp) if err != nil { log.Fatalf("Error updating mobile device application: %v", err) diff --git a/examples/mobile_device_applications/UpdateMobileDeviceApplicationByIDAndAppVersion/UpdateMobileDeviceApplicationByIDAndAppVersion.go b/examples/mobile_device_applications/UpdateMobileDeviceApplicationByIDAndAppVersion/UpdateMobileDeviceApplicationByIDAndAppVersion.go index 8f00c170..4786bf6c 100644 --- a/examples/mobile_device_applications/UpdateMobileDeviceApplicationByIDAndAppVersion/UpdateMobileDeviceApplicationByIDAndAppVersion.go +++ b/examples/mobile_device_applications/UpdateMobileDeviceApplicationByIDAndAppVersion/UpdateMobileDeviceApplicationByIDAndAppVersion.go @@ -18,7 +18,7 @@ func main() { } // Define the ID and version of the mobile device application you want to update - appID := 123 // Replace with actual ID + appID := "1" // Replace with actual ID appVersion := "10.10.7" // Replace with the actual version // Define the mobile device application data for update diff --git a/examples/mobile_device_configuration_profiles/DeleteMobileDeviceConfigurationProfileByID/DeleteMobileDeviceConfigurationProfileByID.go b/examples/mobile_device_configuration_profiles/DeleteMobileDeviceConfigurationProfileByID/DeleteMobileDeviceConfigurationProfileByID.go index 817be18f..c8bb869b 100644 --- a/examples/mobile_device_configuration_profiles/DeleteMobileDeviceConfigurationProfileByID/DeleteMobileDeviceConfigurationProfileByID.go +++ b/examples/mobile_device_configuration_profiles/DeleteMobileDeviceConfigurationProfileByID/DeleteMobileDeviceConfigurationProfileByID.go @@ -18,7 +18,7 @@ func main() { } // Delete profile by ID - if err := client.DeleteMobileDeviceConfigurationProfileByID(2); err != nil { + if err := client.DeleteMobileDeviceConfigurationProfileByID("2"); err != nil { fmt.Println("Error deleting profile by ID:", err) } else { fmt.Println("Profile deleted successfully by ID") diff --git a/examples/mobile_device_configuration_profiles/GetMobileDeviceConfigurationProfileByID/GetMobileDeviceConfigurationProfileByID.go b/examples/mobile_device_configuration_profiles/GetMobileDeviceConfigurationProfileByID/GetMobileDeviceConfigurationProfileByID.go index 2cae7135..838a48b2 100644 --- a/examples/mobile_device_configuration_profiles/GetMobileDeviceConfigurationProfileByID/GetMobileDeviceConfigurationProfileByID.go +++ b/examples/mobile_device_configuration_profiles/GetMobileDeviceConfigurationProfileByID/GetMobileDeviceConfigurationProfileByID.go @@ -18,7 +18,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - profileID := 19 // Replace with the actual ID + profileID := "1" // Replace with the actual ID profile, err := client.GetMobileDeviceConfigurationProfileByID(profileID) if err != nil { log.Fatalf("Error fetching mobile device configuration profile by ID: %v", err) diff --git a/examples/mobile_device_configuration_profiles/GetMobileDeviceConfigurationProfileByIDWithSubset/GetMobileDeviceConfigurationProfileByIDWithSubset.go b/examples/mobile_device_configuration_profiles/GetMobileDeviceConfigurationProfileByIDWithSubset/GetMobileDeviceConfigurationProfileByIDWithSubset.go index 391e465d..76d77762 100644 --- a/examples/mobile_device_configuration_profiles/GetMobileDeviceConfigurationProfileByIDWithSubset/GetMobileDeviceConfigurationProfileByIDWithSubset.go +++ b/examples/mobile_device_configuration_profiles/GetMobileDeviceConfigurationProfileByIDWithSubset/GetMobileDeviceConfigurationProfileByIDWithSubset.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - profileID := 123 // Replace with the actual ID + profileID := "1" // Replace with the actual ID subset := "desired_subset" // Replace with the desired subset profile, err := client.GetMobileDeviceConfigurationProfileByIDWithSubset(profileID, subset) if err != nil { diff --git a/examples/mobile_device_configuration_profiles/UpdateMobileDeviceConfigurationProfileByID/UpdateMobileDeviceConfigurationProfileByID.go b/examples/mobile_device_configuration_profiles/UpdateMobileDeviceConfigurationProfileByID/UpdateMobileDeviceConfigurationProfileByID.go index a0de0310..df1f91fb 100644 --- a/examples/mobile_device_configuration_profiles/UpdateMobileDeviceConfigurationProfileByID/UpdateMobileDeviceConfigurationProfileByID.go +++ b/examples/mobile_device_configuration_profiles/UpdateMobileDeviceConfigurationProfileByID/UpdateMobileDeviceConfigurationProfileByID.go @@ -42,7 +42,7 @@ func main() { } // Update a profile by ID (assuming ID is known) - updatedProfileByID, err := client.UpdateMobileDeviceConfigurationProfileByID(2, &newProfile) + updatedProfileByID, err := client.UpdateMobileDeviceConfigurationProfileByID("2", &newProfile) if err != nil { fmt.Println("Error updating profile by ID:", err) } else { diff --git a/examples/mobile_device_enrollment_groups/DeleteMobileDeviceGroupByID/DeleteMobileDeviceGroupByID.go b/examples/mobile_device_enrollment_groups/DeleteMobileDeviceGroupByID/DeleteMobileDeviceGroupByID.go index 455e59fe..87362959 100644 --- a/examples/mobile_device_enrollment_groups/DeleteMobileDeviceGroupByID/DeleteMobileDeviceGroupByID.go +++ b/examples/mobile_device_enrollment_groups/DeleteMobileDeviceGroupByID/DeleteMobileDeviceGroupByID.go @@ -17,7 +17,7 @@ func main() { } // Define the ID of the group you want to delete - groupID := 5 // Replace with the actual group ID + groupID := "1" // Replace with the actual group ID // Call the DeleteMobileDeviceGroupByID function err = client.DeleteMobileDeviceGroupByID(groupID) diff --git a/examples/mobile_device_enrollment_groups/GetMobileDeviceGroupsByID/GetMobileDeviceGroupsByID.go b/examples/mobile_device_enrollment_groups/GetMobileDeviceGroupsByID/GetMobileDeviceGroupsByID.go index 7be43ed7..6018aab9 100644 --- a/examples/mobile_device_enrollment_groups/GetMobileDeviceGroupsByID/GetMobileDeviceGroupsByID.go +++ b/examples/mobile_device_enrollment_groups/GetMobileDeviceGroupsByID/GetMobileDeviceGroupsByID.go @@ -19,7 +19,7 @@ func main() { } // Fetching a single mobile device group by ID - groupID := 4 // Replace with the actual group ID + groupID := "1" // Replace with the actual group ID mobileGroup, err := client.GetMobileDeviceGroupByID(groupID) if err != nil { diff --git a/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDSmart/UpdateMobileDeviceGroupByIDSmart.go b/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDSmart/UpdateMobileDeviceGroupByIDSmart.go index ceb19404..9f2b7d2b 100644 --- a/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDSmart/UpdateMobileDeviceGroupByIDSmart.go +++ b/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDSmart/UpdateMobileDeviceGroupByIDSmart.go @@ -19,7 +19,7 @@ func main() { } // Define the ID of the group you want to update - groupID := 123 // Replace with the actual group ID + groupID := "1" // Replace with the actual group ID // Define the updated group data updatedSmartGroup := &jamfpro.ResourceMobileDeviceGroup{ diff --git a/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDStatic/UpdateMobileDeviceGroupByIDStatic.go b/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDStatic/UpdateMobileDeviceGroupByIDStatic.go index 6468afc6..f336be39 100644 --- a/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDStatic/UpdateMobileDeviceGroupByIDStatic.go +++ b/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDStatic/UpdateMobileDeviceGroupByIDStatic.go @@ -19,7 +19,7 @@ func main() { } // Define the ID of the group you want to update - groupID := 123 // Replace with the actual group ID + groupID := "1" // Replace with the actual group ID // Define the updated group data for a static group updatedStaticGroup := &jamfpro.ResourceMobileDeviceGroup{ diff --git a/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDStaticGroupAdditions/UpdateMobileDeviceGroupByIDStaticGroupAdditions.go b/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDStaticGroupAdditions/UpdateMobileDeviceGroupByIDStaticGroupAdditions.go index 0759f91b..4e455f1c 100644 --- a/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDStaticGroupAdditions/UpdateMobileDeviceGroupByIDStaticGroupAdditions.go +++ b/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDStaticGroupAdditions/UpdateMobileDeviceGroupByIDStaticGroupAdditions.go @@ -19,7 +19,7 @@ func main() { } // Define the name of the group you want to update - groupID := 1 // Replace with the actual group name + groupID := "1" // Replace with the actual group name // Define the updated group data with mobile device additions updatedGroup := &jamfpro.ResourceMobileDeviceGroup{ diff --git a/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDStaticGroupDeletions/UpdateMobileDeviceGroupByIDStaticGroupDeletions.go b/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDStaticGroupDeletions/UpdateMobileDeviceGroupByIDStaticGroupDeletions.go index b30c8535..5e64da29 100644 --- a/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDStaticGroupDeletions/UpdateMobileDeviceGroupByIDStaticGroupDeletions.go +++ b/examples/mobile_device_enrollment_groups/UpdateMobileDeviceGroupByIDStaticGroupDeletions/UpdateMobileDeviceGroupByIDStaticGroupDeletions.go @@ -19,7 +19,7 @@ func main() { } // Define the name of the group you want to update - groupID := 1 // Replace with the actual group name + groupID := "1" // Replace with the actual group name // Define the updated group data with mobile device deletions updatedGroup := &jamfpro.ResourceMobileDeviceGroup{ diff --git a/examples/mobile_device_enrollment_profiles/DeleteMobileDeviceEnrollmentProfileByID/DeleteMobileDeviceEnrollmentProfileByID.go b/examples/mobile_device_enrollment_profiles/DeleteMobileDeviceEnrollmentProfileByID/DeleteMobileDeviceEnrollmentProfileByID.go index 0651cb65..d289fb1b 100644 --- a/examples/mobile_device_enrollment_profiles/DeleteMobileDeviceEnrollmentProfileByID/DeleteMobileDeviceEnrollmentProfileByID.go +++ b/examples/mobile_device_enrollment_profiles/DeleteMobileDeviceEnrollmentProfileByID/DeleteMobileDeviceEnrollmentProfileByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - profileID := 1 // Replace with actual ID + profileID := "1" // Replace with actual ID err = client.DeleteMobileDeviceEnrollmentProfileByID(profileID) if err != nil { diff --git a/examples/mobile_device_enrollment_profiles/GetMobileDeviceEnrollmentProfileByID/GetMobileDeviceEnrollmentProfileByID.go b/examples/mobile_device_enrollment_profiles/GetMobileDeviceEnrollmentProfileByID/GetMobileDeviceEnrollmentProfileByID.go index 3d6b3c4f..3fce5399 100644 --- a/examples/mobile_device_enrollment_profiles/GetMobileDeviceEnrollmentProfileByID/GetMobileDeviceEnrollmentProfileByID.go +++ b/examples/mobile_device_enrollment_profiles/GetMobileDeviceEnrollmentProfileByID/GetMobileDeviceEnrollmentProfileByID.go @@ -18,7 +18,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - profileID := 1 // Replace with the actual ID + profileID := "1" // Replace with the actual ID profile, err := client.GetMobileDeviceEnrollmentProfileByID(profileID) if err != nil { diff --git a/examples/mobile_device_enrollment_profiles/GetMobileDeviceEnrollmentProfileByIDWithSubset/GetMobileDeviceEnrollmentProfileByIDWithSubset.go b/examples/mobile_device_enrollment_profiles/GetMobileDeviceEnrollmentProfileByIDWithSubset/GetMobileDeviceEnrollmentProfileByIDWithSubset.go index 971e91f6..9497d14e 100644 --- a/examples/mobile_device_enrollment_profiles/GetMobileDeviceEnrollmentProfileByIDWithSubset/GetMobileDeviceEnrollmentProfileByIDWithSubset.go +++ b/examples/mobile_device_enrollment_profiles/GetMobileDeviceEnrollmentProfileByIDWithSubset/GetMobileDeviceEnrollmentProfileByIDWithSubset.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - profileID := 1 // Replace with the actual profile ID + profileID := "1" // Replace with the actual profile ID subset := "general" // Replace with the actual subset (e.g., "general") profile, err := client.GetMobileDeviceEnrollmentProfileByIDWithSubset(profileID, subset) diff --git a/examples/mobile_device_enrollment_profiles/UpdateMobileDeviceEnrollmentProfileByID/UpdateMobileDeviceEnrollmentProfileByID.go b/examples/mobile_device_enrollment_profiles/UpdateMobileDeviceEnrollmentProfileByID/UpdateMobileDeviceEnrollmentProfileByID.go index 7f40a8e4..edde872f 100644 --- a/examples/mobile_device_enrollment_profiles/UpdateMobileDeviceEnrollmentProfileByID/UpdateMobileDeviceEnrollmentProfileByID.go +++ b/examples/mobile_device_enrollment_profiles/UpdateMobileDeviceEnrollmentProfileByID/UpdateMobileDeviceEnrollmentProfileByID.go @@ -58,7 +58,7 @@ func main() { }, } - profileID := 1 // Replace 123 with the actual ID + profileID := "1" // Replace 123 with the actual ID updatedProfile, err := client.UpdateMobileDeviceEnrollmentProfileByID(profileID, &profileToUpdate) if err != nil { diff --git a/examples/mobile_device_provisioning_profiles/CreateMobileDeviceProvisioningProfileByID/CreateMobileDeviceProvisioningProfileByID.go b/examples/mobile_device_provisioning_profiles/CreateMobileDeviceProvisioningProfileByID/CreateMobileDeviceProvisioningProfileByID.go index befaad5a..4bf6f233 100644 --- a/examples/mobile_device_provisioning_profiles/CreateMobileDeviceProvisioningProfileByID/CreateMobileDeviceProvisioningProfileByID.go +++ b/examples/mobile_device_provisioning_profiles/CreateMobileDeviceProvisioningProfileByID/CreateMobileDeviceProvisioningProfileByID.go @@ -18,7 +18,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - profileID := 123 // Replace with the actual ID + profileID := "1" // Replace with the actual ID newProfile := &jamfpro.ResourceMobileDeviceProvisioningProfile{ General: jamfpro.MobileDeviceProvisioningProfileSubsetGeneral{ Name: "in-house app profile", diff --git a/examples/mobile_device_provisioning_profiles/DeleteMobileDeviceProvisioningProfileByID/DeleteMobileDeviceProvisioningProfileByID.go b/examples/mobile_device_provisioning_profiles/DeleteMobileDeviceProvisioningProfileByID/DeleteMobileDeviceProvisioningProfileByID.go index 5f41de56..7f09bc05 100644 --- a/examples/mobile_device_provisioning_profiles/DeleteMobileDeviceProvisioningProfileByID/DeleteMobileDeviceProvisioningProfileByID.go +++ b/examples/mobile_device_provisioning_profiles/DeleteMobileDeviceProvisioningProfileByID/DeleteMobileDeviceProvisioningProfileByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - profileID := 1 // Replace with the actual ID to delete + profileID := "1" // Replace with the actual ID to delete err = client.DeleteMobileDeviceProvisioningProfileByID(profileID) if err != nil { diff --git a/examples/mobile_device_provisioning_profiles/GetMobileDeviceProvisioningProfileByID/GetMobileDeviceProvisioningProfileByID.go b/examples/mobile_device_provisioning_profiles/GetMobileDeviceProvisioningProfileByID/GetMobileDeviceProvisioningProfileByID.go index 6520ccd3..e37f0784 100644 --- a/examples/mobile_device_provisioning_profiles/GetMobileDeviceProvisioningProfileByID/GetMobileDeviceProvisioningProfileByID.go +++ b/examples/mobile_device_provisioning_profiles/GetMobileDeviceProvisioningProfileByID/GetMobileDeviceProvisioningProfileByID.go @@ -18,7 +18,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - profileID := 1 // Replace with the actual profile ID + profileID := "1" // Replace with the actual profile ID profile, err := client.GetMobileDeviceProvisioningProfileByID(profileID) if err != nil { diff --git a/examples/mobile_device_provisioning_profiles/UpdateMobileDeviceProvisioningProfileByID/UpdateMobileDeviceProvisioningProfileByID.go b/examples/mobile_device_provisioning_profiles/UpdateMobileDeviceProvisioningProfileByID/UpdateMobileDeviceProvisioningProfileByID.go index 66431e1d..930b2568 100644 --- a/examples/mobile_device_provisioning_profiles/UpdateMobileDeviceProvisioningProfileByID/UpdateMobileDeviceProvisioningProfileByID.go +++ b/examples/mobile_device_provisioning_profiles/UpdateMobileDeviceProvisioningProfileByID/UpdateMobileDeviceProvisioningProfileByID.go @@ -18,7 +18,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - profileID := 1 // Replace with the actual ID + profileID := "1" // Replace with the actual ID updatedProfile := &jamfpro.ResourceMobileDeviceProvisioningProfile{ General: jamfpro.MobileDeviceProvisioningProfileSubsetGeneral{ diff --git a/examples/mobile_devices/DeleteMobileDeviceByID/DeleteMobileDeviceByID.go b/examples/mobile_devices/DeleteMobileDeviceByID/DeleteMobileDeviceByID.go index 94ed17ac..076d4169 100644 --- a/examples/mobile_devices/DeleteMobileDeviceByID/DeleteMobileDeviceByID.go +++ b/examples/mobile_devices/DeleteMobileDeviceByID/DeleteMobileDeviceByID.go @@ -17,7 +17,7 @@ func main() { } // Example device ID to delete - deviceID := 1 // Replace with an actual device ID + deviceID := "1" // Replace with an actual device ID // Delete mobile device by ID err = client.DeleteMobileDeviceByID(deviceID) diff --git a/examples/mobile_devices/GetMobileDeviceByIDAndDataSubset/GetMobileDeviceByIDAndDataSubset.go b/examples/mobile_devices/GetMobileDeviceByIDAndDataSubset/GetMobileDeviceByIDAndDataSubset.go index 13257b98..a1c8731d 100644 --- a/examples/mobile_devices/GetMobileDeviceByIDAndDataSubset/GetMobileDeviceByIDAndDataSubset.go +++ b/examples/mobile_devices/GetMobileDeviceByIDAndDataSubset/GetMobileDeviceByIDAndDataSubset.go @@ -19,7 +19,7 @@ func main() { } // Example device ID and subset - deviceID := 1 // Replace with an actual device ID + deviceID := "1" // Replace with an actual device ID subset := "General" // Replace with the desired subset // Get mobile device by ID and subset diff --git a/examples/mobile_devices/GetMobileDevicesByID/GetMobileDevicesByID.go b/examples/mobile_devices/GetMobileDevicesByID/GetMobileDevicesByID.go index ff40998b..35ddb73a 100644 --- a/examples/mobile_devices/GetMobileDevicesByID/GetMobileDevicesByID.go +++ b/examples/mobile_devices/GetMobileDevicesByID/GetMobileDevicesByID.go @@ -19,7 +19,7 @@ func main() { } // Example device ID - deviceID := 1 // Replace with an actual device name + deviceID := "1" // Replace with an actual device name // Get mobile device by ID deviceByID, err := client.GetMobileDeviceByID(deviceID) diff --git a/examples/mobile_devices/UpdateMobileDeviceByID/UpdateMobileDeviceByID.go b/examples/mobile_devices/UpdateMobileDeviceByID/UpdateMobileDeviceByID.go index 755d3292..10767f9c 100644 --- a/examples/mobile_devices/UpdateMobileDeviceByID/UpdateMobileDeviceByID.go +++ b/examples/mobile_devices/UpdateMobileDeviceByID/UpdateMobileDeviceByID.go @@ -29,7 +29,7 @@ func main() { }, } - mobileDeviceID := 1 + mobileDeviceID := "1" // Create the mobile device in Jamf Pro responseDevice, err := client.UpdateMobileDeviceByID(mobileDeviceID, mobileDevice) diff --git a/examples/mobile_extension_attributes/DeleteMobileExtensionAttributeByID/DeleteMobileExtensionAttributeByID.go b/examples/mobile_extension_attributes/DeleteMobileExtensionAttributeByID/DeleteMobileExtensionAttributeByID.go index 330c187a..07a6aed7 100644 --- a/examples/mobile_extension_attributes/DeleteMobileExtensionAttributeByID/DeleteMobileExtensionAttributeByID.go +++ b/examples/mobile_extension_attributes/DeleteMobileExtensionAttributeByID/DeleteMobileExtensionAttributeByID.go @@ -17,7 +17,7 @@ func main() { } // ID of the mobile extension attribute to delete - id := 1 // Replace with the actual ID + id := "1" // Replace with the actual ID if err := client.DeleteMobileExtensionAttributeByID(id); err != nil { log.Fatalf("Error deleting mobile extension attribute by ID: %v", err) diff --git a/examples/mobile_extension_attributes/GetMobileExtensionAttributeByID/GetMobileExtensionAttributeByID.go b/examples/mobile_extension_attributes/GetMobileExtensionAttributeByID/GetMobileExtensionAttributeByID.go index 5ac3c764..cdabec02 100644 --- a/examples/mobile_extension_attributes/GetMobileExtensionAttributeByID/GetMobileExtensionAttributeByID.go +++ b/examples/mobile_extension_attributes/GetMobileExtensionAttributeByID/GetMobileExtensionAttributeByID.go @@ -19,7 +19,7 @@ func main() { } // Replace with an actual ID - id := 1 + id := "1" extensionAttributes, err := client.GetMobileExtensionAttributeByID(id) if err != nil { diff --git a/examples/mobile_extension_attributes/UpdateMobileExtensionAttributeByID/UpdateMobileExtensionAttributeByID.go b/examples/mobile_extension_attributes/UpdateMobileExtensionAttributeByID/UpdateMobileExtensionAttributeByID.go index e4644618..8d4e6e0b 100644 --- a/examples/mobile_extension_attributes/UpdateMobileExtensionAttributeByID/UpdateMobileExtensionAttributeByID.go +++ b/examples/mobile_extension_attributes/UpdateMobileExtensionAttributeByID/UpdateMobileExtensionAttributeByID.go @@ -28,7 +28,7 @@ func main() { }, } - updatedAttributeID := 1 + updatedAttributeID := "1" // Update the attribute attribute, err := client.UpdateMobileExtensionAttributeByID(updatedAttributeID, updatedAttribute) diff --git a/examples/network_segments/DeleteNetworkSegmentByID/DeleteNetworkSegmentByID.go b/examples/network_segments/DeleteNetworkSegmentByID/DeleteNetworkSegmentByID.go index 1c2362ac..2bbeae76 100644 --- a/examples/network_segments/DeleteNetworkSegmentByID/DeleteNetworkSegmentByID.go +++ b/examples/network_segments/DeleteNetworkSegmentByID/DeleteNetworkSegmentByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - segmentID := 1 // Replace with actual ID of the network segment to delete + segmentID := "1" // Replace with actual ID of the network segment to delete err = client.DeleteNetworkSegmentByID(segmentID) if err != nil { diff --git a/examples/network_segments/GetNetworkSegmentByID/GetNetworkSegmentByID.go b/examples/network_segments/GetNetworkSegmentByID/GetNetworkSegmentByID.go index 675913dc..b8a6985c 100644 --- a/examples/network_segments/GetNetworkSegmentByID/GetNetworkSegmentByID.go +++ b/examples/network_segments/GetNetworkSegmentByID/GetNetworkSegmentByID.go @@ -19,7 +19,7 @@ func main() { } // Retrieve a network segment by ID - id := 1 // Replace with actual ID + id := "1" // Replace with actual ID segment, err := client.GetNetworkSegmentByID(id) if err != nil { log.Fatalf("Error fetching network segment by ID: %v", err) diff --git a/examples/network_segments/UpdateNetworkSegmentByID/UpdateNetworkSegmentByID.go b/examples/network_segments/UpdateNetworkSegmentByID/UpdateNetworkSegmentByID.go index b1692d25..708596e6 100644 --- a/examples/network_segments/UpdateNetworkSegmentByID/UpdateNetworkSegmentByID.go +++ b/examples/network_segments/UpdateNetworkSegmentByID/UpdateNetworkSegmentByID.go @@ -27,7 +27,7 @@ func main() { OverrideDepartments: false, } - segmentID := 1 // Replace with actual ID + segmentID := "1" // Replace with actual ID updated, err := client.UpdateNetworkSegmentByID(segmentID, updatedSegment) if err != nil { diff --git a/examples/patch_policies/DeletePatchPolicyByID/DeletePatchPolicyByID.go b/examples/patch_policies/DeletePatchPolicyByID/DeletePatchPolicyByID.go index b0881346..19d17ec7 100644 --- a/examples/patch_policies/DeletePatchPolicyByID/DeletePatchPolicyByID.go +++ b/examples/patch_policies/DeletePatchPolicyByID/DeletePatchPolicyByID.go @@ -18,7 +18,7 @@ func main() { } // Example patch policy ID - patchPolicyID := 123 // Replace with an actual patch policy ID + patchPolicyID := "1" // Replace with an actual patch policy ID // Call DeletePatchPolicy function err = client.DeletePatchPolicyByID(patchPolicyID) diff --git a/examples/patch_policies/GetPatchPoliciesByID/GetPatchPoliciesByID.go b/examples/patch_policies/GetPatchPoliciesByID/GetPatchPoliciesByID.go index 21c6b3a6..9c411bfd 100644 --- a/examples/patch_policies/GetPatchPoliciesByID/GetPatchPoliciesByID.go +++ b/examples/patch_policies/GetPatchPoliciesByID/GetPatchPoliciesByID.go @@ -19,7 +19,7 @@ func main() { } // The ID of the patch policy you want to retrieve - patchPolicyID := 1 // Replace with the actual ID you want to retrieve + patchPolicyID := "1" // Replace with the actual ID you want to retrieve // Call the GetPatchPoliciesByID function patchPolicy, err := client.GetPatchPoliciesByID(patchPolicyID) diff --git a/examples/patch_policies/GetPatchPolicyByIDAndDataSubset/GetPatchPolicyByIDAndDataSubset.go b/examples/patch_policies/GetPatchPolicyByIDAndDataSubset/GetPatchPolicyByIDAndDataSubset.go index 3508d1f7..bb812534 100644 --- a/examples/patch_policies/GetPatchPolicyByIDAndDataSubset/GetPatchPolicyByIDAndDataSubset.go +++ b/examples/patch_policies/GetPatchPolicyByIDAndDataSubset/GetPatchPolicyByIDAndDataSubset.go @@ -18,8 +18,8 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - patchPolicyID := 1 // Example ID - subset := "general" // Replace with the desired subset name + patchPolicyID := "1" // Example ID + subset := "general" // Replace with the desired subset name patchPolicy, err := client.GetPatchPolicyByIDAndDataSubset(patchPolicyID, subset) if err != nil { diff --git a/examples/policies/DeletePolicyByID/DeletePolicyByID.go b/examples/policies/DeletePolicyByID/DeletePolicyByID.go index 86fa7950..31253db1 100644 --- a/examples/policies/DeletePolicyByID/DeletePolicyByID.go +++ b/examples/policies/DeletePolicyByID/DeletePolicyByID.go @@ -18,7 +18,7 @@ func main() { } // Define the policy ID to be deleted - policyID := 123 // Replace with the actual policy ID + policyID := "1" // Replace with the actual policy ID // Delete the policy by ID err = client.DeletePolicyByID(policyID) // Changed here from := to = diff --git a/examples/policies/GetPolicyByID/GetPolicyByID.go b/examples/policies/GetPolicyByID/GetPolicyByID.go index 68c1056e..b4a6cc82 100644 --- a/examples/policies/GetPolicyByID/GetPolicyByID.go +++ b/examples/policies/GetPolicyByID/GetPolicyByID.go @@ -19,7 +19,7 @@ func main() { } // Define a policy ID for testing - policyID := 1548 // Replace with the actual policy ID you want to fetch + policyID := "1" // Replace with the actual policy ID you want to fetch // Call GetPolicyByID function policy, err := client.GetPolicyByID(policyID) diff --git a/examples/policies/UpdatePolicyByID/UpdatePolicyByID.go b/examples/policies/UpdatePolicyByID/UpdatePolicyByID.go index cf9aa8aa..663d280b 100644 --- a/examples/policies/UpdatePolicyByID/UpdatePolicyByID.go +++ b/examples/policies/UpdatePolicyByID/UpdatePolicyByID.go @@ -144,7 +144,7 @@ func main() { } fmt.Println("Policy Details to be Sent:\n", string(policyXML)) - policyID := 19 + policyID := "1" // Update the policy response, err := client.UpdatePolicyByID(policyID, updatedPolicy) diff --git a/examples/printers/DeleteAllPrinters/DeleteAllPrinters.go b/examples/printers/DeleteAllPrinters/DeleteAllPrinters.go index 15449293..aab72406 100644 --- a/examples/printers/DeleteAllPrinters/DeleteAllPrinters.go +++ b/examples/printers/DeleteAllPrinters/DeleteAllPrinters.go @@ -3,6 +3,7 @@ package main import ( "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -29,7 +30,7 @@ func main() { for _, printer := range printers.Printer { fmt.Printf("deleting printer ID: %d, Name: %s\n", printer.ID, printer.Name) - err = client.DeletePrinterByID(printer.ID) + err = client.DeletePrinterByID(strconv.Itoa(printer.ID)) if err != nil { log.Printf("error deleting printer ID %d: %v\n", printer.ID, err) continue // Move to the next printer if there's an error diff --git a/examples/printers/DeletePrinterByID/DeletePrinterByID.go b/examples/printers/DeletePrinterByID/DeletePrinterByID.go index b16dc8f0..d720ef1f 100644 --- a/examples/printers/DeletePrinterByID/DeletePrinterByID.go +++ b/examples/printers/DeletePrinterByID/DeletePrinterByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - id := 1 // Replace with the actual printer ID + id := "1" // Replace with the actual printer ID err = client.DeletePrinterByID(id) if err != nil { diff --git a/examples/printers/GetPrinterByID/GetPrinterByID.go b/examples/printers/GetPrinterByID/GetPrinterByID.go index 981cab0a..3a0a3b8e 100644 --- a/examples/printers/GetPrinterByID/GetPrinterByID.go +++ b/examples/printers/GetPrinterByID/GetPrinterByID.go @@ -19,7 +19,7 @@ func main() { } // Example ID to fetch - printerID := 356 + printerID := "1" printer, err := client.GetPrinterByID(printerID) if err != nil { diff --git a/examples/printers/UpdatePrinterByID/UpdatePrinterByID.go b/examples/printers/UpdatePrinterByID/UpdatePrinterByID.go index 5e750d3f..7f585587 100644 --- a/examples/printers/UpdatePrinterByID/UpdatePrinterByID.go +++ b/examples/printers/UpdatePrinterByID/UpdatePrinterByID.go @@ -4,6 +4,7 @@ import ( "encoding/xml" "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -35,7 +36,7 @@ func main() { PPDContents: "string", } - id := 1 // Replace with the actual printer ID + id := "1" // Replace with the actual printer ID response, err := client.UpdatePrinterByID(id, updatedPrinter) if err != nil { @@ -46,7 +47,7 @@ func main() { fmt.Printf("Printer updated successfully, ID: %d\n", response.ID) // Fetch the full details of the updated printer - updatedPrinterDetails, err := client.GetPrinterByID(response.ID) + updatedPrinterDetails, err := client.GetPrinterByID(strconv.Itoa(response.ID)) if err != nil { fmt.Println("Error fetching updated printer details:", err) return diff --git a/examples/printers/UpdatePrinterByName/UpdatePrinterByName.go b/examples/printers/UpdatePrinterByName/UpdatePrinterByName.go index 82824a23..b09b7fb7 100644 --- a/examples/printers/UpdatePrinterByName/UpdatePrinterByName.go +++ b/examples/printers/UpdatePrinterByName/UpdatePrinterByName.go @@ -4,6 +4,7 @@ import ( "encoding/xml" "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -46,7 +47,7 @@ func main() { fmt.Printf("Printer updated successfully, ID: %d\n", response.ID) // Fetch the full details of the updated printer - updatedPrinterDetails, err := client.GetPrinterByID(response.ID) + updatedPrinterDetails, err := client.GetPrinterByID(strconv.Itoa(response.ID)) if err != nil { fmt.Println("Error fetching updated printer details:", err) return diff --git a/examples/removeable_mac_addresses/DeleteRemovableMACAddressByID/DeleteRemovableMACAddressByID.go b/examples/removeable_mac_addresses/DeleteRemovableMACAddressByID/DeleteRemovableMACAddressByID.go index 45649da2..1688ca6d 100644 --- a/examples/removeable_mac_addresses/DeleteRemovableMACAddressByID/DeleteRemovableMACAddressByID.go +++ b/examples/removeable_mac_addresses/DeleteRemovableMACAddressByID/DeleteRemovableMACAddressByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - macAddressID := 1 // Replace with the actual MAC address ID + macAddressID := "1" // Replace with the actual MAC address ID err = client.DeleteRemovableMACAddressByID(macAddressID) if err != nil { diff --git a/examples/removeable_mac_addresses/GetRemovableMACAddressByID/GetRemovableMACAddressByID.go b/examples/removeable_mac_addresses/GetRemovableMACAddressByID/GetRemovableMACAddressByID.go index 3ac96fdf..4f6f7341 100644 --- a/examples/removeable_mac_addresses/GetRemovableMACAddressByID/GetRemovableMACAddressByID.go +++ b/examples/removeable_mac_addresses/GetRemovableMACAddressByID/GetRemovableMACAddressByID.go @@ -18,7 +18,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - macAddressID := 1 + macAddressID := "1" macAddresses, err := client.GetRemovableMACAddressByID(macAddressID) if err != nil { diff --git a/examples/removeable_mac_addresses/UpdateRemovableMACAddressByID/UpdateRemovableMACAddressByID.go b/examples/removeable_mac_addresses/UpdateRemovableMACAddressByID/UpdateRemovableMACAddressByID.go index 2ea28cfa..7b7a1edb 100644 --- a/examples/removeable_mac_addresses/UpdateRemovableMACAddressByID/UpdateRemovableMACAddressByID.go +++ b/examples/removeable_mac_addresses/UpdateRemovableMACAddressByID/UpdateRemovableMACAddressByID.go @@ -4,6 +4,7 @@ import ( "encoding/xml" "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -24,7 +25,7 @@ func main() { Name: "New_Name", // Replace with the new name } - macAddress, err := client.UpdateRemovableMACAddressByID(macAddressID, updatedMACAddress) + macAddress, err := client.UpdateRemovableMACAddressByID(strconv.Itoa(macAddressID), updatedMACAddress) if err != nil { fmt.Println("Error:", err) return diff --git a/examples/restricted_software/DeleteRestrictedSoftwareByID/DeleteRestrictedSoftwareByID.go b/examples/restricted_software/DeleteRestrictedSoftwareByID/DeleteRestrictedSoftwareByID.go index 4d984dd1..9b70767c 100644 --- a/examples/restricted_software/DeleteRestrictedSoftwareByID/DeleteRestrictedSoftwareByID.go +++ b/examples/restricted_software/DeleteRestrictedSoftwareByID/DeleteRestrictedSoftwareByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - restrictedSoftwareID := 1 // Replace with the actual ID + restrictedSoftwareID := "1" // Replace with the actual ID err = client.DeleteRestrictedSoftwareByID(restrictedSoftwareID) if err != nil { diff --git a/examples/restricted_software/GetRestrictedSoftwareByID/GetRestrictedSoftwareByID.go b/examples/restricted_software/GetRestrictedSoftwareByID/GetRestrictedSoftwareByID.go index 7d3ac4e3..5f8dc333 100644 --- a/examples/restricted_software/GetRestrictedSoftwareByID/GetRestrictedSoftwareByID.go +++ b/examples/restricted_software/GetRestrictedSoftwareByID/GetRestrictedSoftwareByID.go @@ -18,7 +18,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - restrictedSoftwareID := 1 // Replace with actual ID + restrictedSoftwareID := "1" // Replace with actual ID restrictedSoftware, err := client.GetRestrictedSoftwareByID(restrictedSoftwareID) if err != nil { diff --git a/examples/restricted_software/UpdateRestrictedSoftwareByID/UpdateRestrictedSoftwareByID.go b/examples/restricted_software/UpdateRestrictedSoftwareByID/UpdateRestrictedSoftwareByID.go index 3a572215..995ebeb5 100644 --- a/examples/restricted_software/UpdateRestrictedSoftwareByID/UpdateRestrictedSoftwareByID.go +++ b/examples/restricted_software/UpdateRestrictedSoftwareByID/UpdateRestrictedSoftwareByID.go @@ -4,6 +4,7 @@ import ( "encoding/xml" "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -18,7 +19,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - restrictedSoftwareID := 3 // Replace with actual ID + restrictedSoftwareID := "1" // Replace with actual ID updatedRestrictedSoftware := &jamfpro.ResourceRestrictedSoftware{ General: jamfpro.RestrictedSoftwareSubsetGeneral{ @@ -63,7 +64,7 @@ func main() { fmt.Printf("restricted software updated successfully, ID: %d\n", response.ID) // Fetch the full details of the updated restricted software - updatedPrinterDetails, err := client.GetRestrictedSoftwareByID(response.ID) + updatedPrinterDetails, err := client.GetRestrictedSoftwareByID(strconv.Itoa(response.ID)) if err != nil { fmt.Println("Error fetching updated restricted software details:", err) return diff --git a/examples/restricted_software/UpdateRestrictedSoftwareByName/UpdateRestrictedSoftwareByName.go b/examples/restricted_software/UpdateRestrictedSoftwareByName/UpdateRestrictedSoftwareByName.go index 242f7c1a..92518feb 100644 --- a/examples/restricted_software/UpdateRestrictedSoftwareByName/UpdateRestrictedSoftwareByName.go +++ b/examples/restricted_software/UpdateRestrictedSoftwareByName/UpdateRestrictedSoftwareByName.go @@ -4,6 +4,7 @@ import ( "encoding/xml" "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -59,7 +60,7 @@ func main() { fmt.Printf("restricted software updated successfully, ID: %d\n", response.ID) // Fetch the full details of the updated restricted software - updatedPrinterDetails, err := client.GetRestrictedSoftwareByID(response.ID) + updatedPrinterDetails, err := client.GetRestrictedSoftwareByID(strconv.Itoa(response.ID)) if err != nil { fmt.Println("Error fetching updated restricted software details:", err) return diff --git a/examples/sites/DeleteAllSites/DeleteAllSites.go b/examples/sites/DeleteAllSites/DeleteAllSites.go index 8b5cb500..75827a2f 100644 --- a/examples/sites/DeleteAllSites/DeleteAllSites.go +++ b/examples/sites/DeleteAllSites/DeleteAllSites.go @@ -3,6 +3,7 @@ package main import ( "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -29,7 +30,7 @@ func main() { for _, site := range sites.Site { fmt.Printf("Deleting site ID: %d, Name: %s\n", site.ID, site.Name) - err = client.DeleteSiteByID(site.ID) + err = client.DeleteSiteByID(strconv.Itoa(site.ID)) if err != nil { log.Printf("Error deleting site ID %d: %v\n", site.ID, err) continue // Move to the next site if there's an error diff --git a/examples/sites/DeleteSiteByID/DeleteSiteByID.go b/examples/sites/DeleteSiteByID/DeleteSiteByID.go index 15c291af..c49e7842 100644 --- a/examples/sites/DeleteSiteByID/DeleteSiteByID.go +++ b/examples/sites/DeleteSiteByID/DeleteSiteByID.go @@ -3,6 +3,7 @@ package main import ( "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -19,7 +20,7 @@ func main() { siteIDToDelete := 1 // Replace 1 with the actual site ID - err = client.DeleteSiteByID(siteIDToDelete) + err = client.DeleteSiteByID(strconv.Itoa(siteIDToDelete)) if err != nil { log.Fatalf("Error deleting site by ID: %v", err) } diff --git a/examples/sites/GetSiteByID/GetSiteByID.go b/examples/sites/GetSiteByID/GetSiteByID.go index 7a101c99..49e5297f 100644 --- a/examples/sites/GetSiteByID/GetSiteByID.go +++ b/examples/sites/GetSiteByID/GetSiteByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - siteID := 1 // Replace 1 with the actual site ID + siteID := "1" // Replace 1 with the actual site ID // Fetch the site by ID site, err := client.GetSiteByID(siteID) diff --git a/examples/sites/UpdateSiteByID/UpdateSiteByID.go b/examples/sites/UpdateSiteByID/UpdateSiteByID.go index cc5841bf..ebed7796 100644 --- a/examples/sites/UpdateSiteByID/UpdateSiteByID.go +++ b/examples/sites/UpdateSiteByID/UpdateSiteByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - siteID := 123 // Replace with the actual site name + siteID := "1" // Replace with the actual site name updatedSiteName := "Updated Site Name" // Replace with the updated site name // Define the updated site data diff --git a/examples/smart_computer_groups/DeleteComputerGroupByID/DeleteComputerGroupByID.go b/examples/smart_computer_groups/DeleteComputerGroupByID/DeleteComputerGroupByID.go index 83f0035c..74bf57ff 100644 --- a/examples/smart_computer_groups/DeleteComputerGroupByID/DeleteComputerGroupByID.go +++ b/examples/smart_computer_groups/DeleteComputerGroupByID/DeleteComputerGroupByID.go @@ -17,7 +17,7 @@ func main() { } // Define the computer group ID for deletion - groupID := 46 // Replace with the actual ID + groupID := "1" // Replace with the actual ID // Call DeleteComputerGroupByID function err = client.DeleteComputerGroupByID(groupID) diff --git a/examples/smart_computer_groups/GetComputerGroupByID/GetComputerGroupByID.go b/examples/smart_computer_groups/GetComputerGroupByID/GetComputerGroupByID.go index a516575b..f770f52b 100644 --- a/examples/smart_computer_groups/GetComputerGroupByID/GetComputerGroupByID.go +++ b/examples/smart_computer_groups/GetComputerGroupByID/GetComputerGroupByID.go @@ -19,7 +19,7 @@ func main() { } // Call GetComputerGroupByID function - groupID := 195 // Placeholder ID, replace with a valid ID + groupID := "1" // Placeholder ID, replace with a valid ID group, err := client.GetComputerGroupByID(groupID) if err != nil { log.Fatalf("Error fetching Computer Group by ID: %v", err) diff --git a/examples/smart_computer_groups/UpdateSmartComputerGroupByID/UpdateSmartComputerGroupByID.go b/examples/smart_computer_groups/UpdateSmartComputerGroupByID/UpdateSmartComputerGroupByID.go index 3c4b42fa..a892eaaa 100644 --- a/examples/smart_computer_groups/UpdateSmartComputerGroupByID/UpdateSmartComputerGroupByID.go +++ b/examples/smart_computer_groups/UpdateSmartComputerGroupByID/UpdateSmartComputerGroupByID.go @@ -41,7 +41,7 @@ func main() { // Include other fields if necessary } - groupID := 175 // Replace with the actual ID + groupID := "1" // Replace with the actual ID // Call UpdateComputerGroupByID function updatedGroup, err := client.UpdateComputerGroupByID(groupID, groupUpdate) diff --git a/examples/software_update_servers/DeleteSoftwareUpdateServerByID/DeleteSoftwareUpdateServerByID.go b/examples/software_update_servers/DeleteSoftwareUpdateServerByID/DeleteSoftwareUpdateServerByID.go index 79baba53..e19967e8 100644 --- a/examples/software_update_servers/DeleteSoftwareUpdateServerByID/DeleteSoftwareUpdateServerByID.go +++ b/examples/software_update_servers/DeleteSoftwareUpdateServerByID/DeleteSoftwareUpdateServerByID.go @@ -18,7 +18,7 @@ func main() { } // ID of the software update server to delete - serverID := 1 + serverID := "1" // Call DeleteSoftwareUpdateServerByID err = client.DeleteSoftwareUpdateServerByID(serverID) diff --git a/examples/software_update_servers/GetSoftwareUpdateServersByID/GetSoftwareUpdateServersByID.go b/examples/software_update_servers/GetSoftwareUpdateServersByID/GetSoftwareUpdateServersByID.go index 9981d01d..3b62b8e8 100644 --- a/examples/software_update_servers/GetSoftwareUpdateServersByID/GetSoftwareUpdateServersByID.go +++ b/examples/software_update_servers/GetSoftwareUpdateServersByID/GetSoftwareUpdateServersByID.go @@ -19,7 +19,7 @@ func main() { } // Replace with the correct ID - softwareUpdateServerByID, err := client.GetSoftwareUpdateServerByID(1) // Example ID + softwareUpdateServerByID, err := client.GetSoftwareUpdateServerByID("1") // Example ID if err != nil { log.Fatalf("Error fetching software update server by ID: %v", err) } diff --git a/examples/software_update_servers/UpdateSoftwareUpdateServerByID/UpdateSoftwareUpdateServerByID.go b/examples/software_update_servers/UpdateSoftwareUpdateServerByID/UpdateSoftwareUpdateServerByID.go index b7abdf89..7dc01d82 100644 --- a/examples/software_update_servers/UpdateSoftwareUpdateServerByID/UpdateSoftwareUpdateServerByID.go +++ b/examples/software_update_servers/UpdateSoftwareUpdateServerByID/UpdateSoftwareUpdateServerByID.go @@ -4,6 +4,7 @@ import ( "encoding/xml" "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -28,7 +29,7 @@ func main() { } // Call UpdateSoftwareUpdateServerByID - updatedServer, err := client.UpdateSoftwareUpdateServerByID(serverToUpdate.ID, serverToUpdate) + updatedServer, err := client.UpdateSoftwareUpdateServerByID(strconv.Itoa(serverToUpdate.ID), serverToUpdate) if err != nil { log.Fatalf("Error updating software update server by ID: %v", err) } diff --git a/examples/static_computer_groups/UpdateStaticComputerGroupByID/UpdateStaticComputerGroupByID.go b/examples/static_computer_groups/UpdateStaticComputerGroupByID/UpdateStaticComputerGroupByID.go index b33ddcbc..65fdc889 100644 --- a/examples/static_computer_groups/UpdateStaticComputerGroupByID/UpdateStaticComputerGroupByID.go +++ b/examples/static_computer_groups/UpdateStaticComputerGroupByID/UpdateStaticComputerGroupByID.go @@ -19,7 +19,7 @@ func main() { } // The ID of the static computer group you wish to update - groupID := 49 // Replace with your actual group ID + groupID := "1" // Replace with your actual group ID // Define the updated computers for the static group updatedComputers := []jamfpro.ComputerGroupSubsetComputer{ diff --git a/examples/user_extension_attributes/DeleteUserExtensionAttributeByID/DeleteUserExtensionAttributeByID.go b/examples/user_extension_attributes/DeleteUserExtensionAttributeByID/DeleteUserExtensionAttributeByID.go index 4aab3d7b..faf11ec0 100644 --- a/examples/user_extension_attributes/DeleteUserExtensionAttributeByID/DeleteUserExtensionAttributeByID.go +++ b/examples/user_extension_attributes/DeleteUserExtensionAttributeByID/DeleteUserExtensionAttributeByID.go @@ -16,7 +16,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - err = client.DeleteUserExtensionAttributeByID(1) // Replace 1 with the actual ID + err = client.DeleteUserExtensionAttributeByID("1") // Replace 1 with the actual ID if err != nil { log.Fatalf("Error deleting user extension attribute by ID: %v", err) } diff --git a/examples/user_extension_attributes/GetUserExtensionAttributeByID/GetUserExtensionAttributeByID.go b/examples/user_extension_attributes/GetUserExtensionAttributeByID/GetUserExtensionAttributeByID.go index c741764a..64b42f7a 100644 --- a/examples/user_extension_attributes/GetUserExtensionAttributeByID/GetUserExtensionAttributeByID.go +++ b/examples/user_extension_attributes/GetUserExtensionAttributeByID/GetUserExtensionAttributeByID.go @@ -19,7 +19,7 @@ func main() { } // Example ID of the user extension attribute to retrieve - attributeID := 1 + attributeID := "1" // Fetch user extension attribute by ID attribute, err := client.GetUserExtensionAttributeByID(attributeID) diff --git a/examples/user_extension_attributes/UpdateUserExtensionAttributeByID/UpdateUserExtensionAttributeByID.go b/examples/user_extension_attributes/UpdateUserExtensionAttributeByID/UpdateUserExtensionAttributeByID.go index 67bf5712..26673169 100644 --- a/examples/user_extension_attributes/UpdateUserExtensionAttributeByID/UpdateUserExtensionAttributeByID.go +++ b/examples/user_extension_attributes/UpdateUserExtensionAttributeByID/UpdateUserExtensionAttributeByID.go @@ -28,7 +28,7 @@ func main() { } // Example ID of the user extension attribute to rupdate - attributeID := 1 + attributeID := "1" // Update the attribute updatedAttribute, err := client.UpdateUserExtensionAttributeByID(attributeID, attributeToUpdate) // Use the correct ID diff --git a/examples/user_groups/DeleteAllUserGroups/DeleteAllUserGroups.go b/examples/user_groups/DeleteAllUserGroups/DeleteAllUserGroups.go index 135e4705..c88429e4 100644 --- a/examples/user_groups/DeleteAllUserGroups/DeleteAllUserGroups.go +++ b/examples/user_groups/DeleteAllUserGroups/DeleteAllUserGroups.go @@ -3,6 +3,7 @@ package main import ( "fmt" "log" + "strconv" "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro" ) @@ -29,7 +30,7 @@ func main() { for _, userGroup := range userGroupsList.UserGroup { fmt.Printf("Deleting user group ID: %d, Name: %s\n", userGroup.ID, userGroup.Name) - err = client.DeleteUserGroupByID(userGroup.ID) + err = client.DeleteUserGroupByID(strconv.Itoa(userGroup.ID)) if err != nil { log.Printf("Error deleting user group ID %d: %v\n", userGroup.ID, err) continue // Move to the next user group if there's an error diff --git a/examples/user_groups/DeleteUserGroupByID/DeleteUserGroupByID.go b/examples/user_groups/DeleteUserGroupByID/DeleteUserGroupByID.go index b8b440c0..2ff3a819 100644 --- a/examples/user_groups/DeleteUserGroupByID/DeleteUserGroupByID.go +++ b/examples/user_groups/DeleteUserGroupByID/DeleteUserGroupByID.go @@ -18,7 +18,7 @@ func main() { } // Specify the ID of the user group to delete - userGroupID := 1 // Replace with the actual ID + userGroupID := "1" // Replace with the actual ID // Call DeleteUserGroupByID err = client.DeleteUserGroupByID(userGroupID) diff --git a/examples/user_groups/GetUserGroupsByID/GetUserGroupsByID.go b/examples/user_groups/GetUserGroupsByID/GetUserGroupsByID.go index 8268321d..17bdad71 100644 --- a/examples/user_groups/GetUserGroupsByID/GetUserGroupsByID.go +++ b/examples/user_groups/GetUserGroupsByID/GetUserGroupsByID.go @@ -19,7 +19,7 @@ func main() { } // Replace with the actual user group ID you want to fetch - userGroupID := 123 + userGroupID := "1" // Call GetUserGroupsByID to fetch details of a specific user group userGroupDetail, err := client.GetUserGroupByID(userGroupID) diff --git a/examples/user_groups/UpdateUserGroupByIDSmart/UpdateUserGroupByIDSmart.go b/examples/user_groups/UpdateUserGroupByIDSmart/UpdateUserGroupByIDSmart.go index 12c290d7..956662e4 100644 --- a/examples/user_groups/UpdateUserGroupByIDSmart/UpdateUserGroupByIDSmart.go +++ b/examples/user_groups/UpdateUserGroupByIDSmart/UpdateUserGroupByIDSmart.go @@ -41,7 +41,7 @@ func main() { } // Replace with the actual ID of the user group you want to update - userGroupID := 1 + userGroupID := "1" // Call UpdateUserGroupByID to update the user group updatedGroup, err := client.UpdateUserGroupByID(userGroupID, updatedUserGroup) diff --git a/examples/user_groups/UpdateUserGroupByIDStatic/UpdateUserGroupByIDStatic.go b/examples/user_groups/UpdateUserGroupByIDStatic/UpdateUserGroupByIDStatic.go index 01dbd742..d9372666 100644 --- a/examples/user_groups/UpdateUserGroupByIDStatic/UpdateUserGroupByIDStatic.go +++ b/examples/user_groups/UpdateUserGroupByIDStatic/UpdateUserGroupByIDStatic.go @@ -42,7 +42,7 @@ func main() { } // Replace with the actual ID of the user group you want to update - userGroupID := 1 + userGroupID := "1" // Call UpdateUserGroupByID to update the user group updatedGroup, err := client.UpdateUserGroupByID(userGroupID, updatedUserGroup) diff --git a/examples/user_groups/UpdateUserGroupByIDStaticAdditions/UpdateUserGroupByIDStaticAdditions.go b/examples/user_groups/UpdateUserGroupByIDStaticAdditions/UpdateUserGroupByIDStaticAdditions.go index e993b2fb..0b84a392 100644 --- a/examples/user_groups/UpdateUserGroupByIDStaticAdditions/UpdateUserGroupByIDStaticAdditions.go +++ b/examples/user_groups/UpdateUserGroupByIDStaticAdditions/UpdateUserGroupByIDStaticAdditions.go @@ -27,7 +27,7 @@ func main() { } // Replace with the actual ID of the user group you want to update - userGroupID := 1 + userGroupID := "1" // Call UpdateUserGroupByID to update the user group updatedGroup, err := client.UpdateUserGroupByID(userGroupID, updatedUserGroup) diff --git a/examples/user_groups/UpdateUserGroupByIDStaticDeletions/UpdateUserGroupByIDStaticDeletions.go b/examples/user_groups/UpdateUserGroupByIDStaticDeletions/UpdateUserGroupByIDStaticDeletions.go index 37a5d6f1..166ea12c 100644 --- a/examples/user_groups/UpdateUserGroupByIDStaticDeletions/UpdateUserGroupByIDStaticDeletions.go +++ b/examples/user_groups/UpdateUserGroupByIDStaticDeletions/UpdateUserGroupByIDStaticDeletions.go @@ -27,7 +27,7 @@ func main() { } // Replace with the actual ID of the user group you want to update - userGroupID := 1 + userGroupID := "1" // Call UpdateUserGroupByID to update the user group updatedGroup, err := client.UpdateUserGroupByID(userGroupID, updatedUserGroup) diff --git a/examples/users/DeleteUserByID/DeleteUserByID.go b/examples/users/DeleteUserByID/DeleteUserByID.go index 284691f6..6b981540 100644 --- a/examples/users/DeleteUserByID/DeleteUserByID.go +++ b/examples/users/DeleteUserByID/DeleteUserByID.go @@ -17,7 +17,7 @@ func main() { log.Fatalf("Failed to initialize Jamf Pro client: %v", err) } - userID := 1 // Example user ID to delete + userID := "1" // Example user ID to delete err = client.DeleteUserByID(userID) if err != nil { diff --git a/examples/users/GetUserByID/GetUserByID.go b/examples/users/GetUserByID/GetUserByID.go index b52900bc..e7f3f9bb 100644 --- a/examples/users/GetUserByID/GetUserByID.go +++ b/examples/users/GetUserByID/GetUserByID.go @@ -19,7 +19,7 @@ func main() { } // Specify the ID of the user you want to retrieve - userID := 1 // Replace with the desired user ID + userID := "1" // Replace with the desired user ID // Call the GetUserByID function user, err := client.GetUserByID(userID) diff --git a/examples/users/UpdateUserByID/UpdateUserByID.go b/examples/users/UpdateUserByID/UpdateUserByID.go index 542d6b8f..cea88fc5 100644 --- a/examples/users/UpdateUserByID/UpdateUserByID.go +++ b/examples/users/UpdateUserByID/UpdateUserByID.go @@ -35,7 +35,7 @@ func main() { } // Replace with the actual ID of the user you want to update - userID := 1 + userID := "1" // Call UpdateUserByID to update the user updatedUser, err = client.UpdateUserByID(userID, updatedUser) diff --git a/examples/vpp_accounts/DeleteVPPAccountByID/DeleteVPPAccountByID.go b/examples/vpp_accounts/DeleteVPPAccountByID/DeleteVPPAccountByID.go index 06b8dad8..3f47be08 100644 --- a/examples/vpp_accounts/DeleteVPPAccountByID/DeleteVPPAccountByID.go +++ b/examples/vpp_accounts/DeleteVPPAccountByID/DeleteVPPAccountByID.go @@ -18,7 +18,7 @@ func main() { } // Assume we are deleting the account with ID 1 - err = client.DeleteVPPAccountByID(1) + err = client.DeleteVPPAccountByID("1") if err != nil { log.Fatalf("Error deleting VPP account: %v", err) } diff --git a/examples/vpp_accounts/GetVPPAccountByID/GetVPPAccountByID.go b/examples/vpp_accounts/GetVPPAccountByID/GetVPPAccountByID.go index b2cd25e7..1841545e 100644 --- a/examples/vpp_accounts/GetVPPAccountByID/GetVPPAccountByID.go +++ b/examples/vpp_accounts/GetVPPAccountByID/GetVPPAccountByID.go @@ -18,7 +18,7 @@ func main() { } // Example VPP Account ID - vppAccountID := 1 + vppAccountID := "1" // Call GetVPPAccountByID vppAccount, err := client.GetVPPAccountByID(vppAccountID) diff --git a/examples/vpp_accounts/UpdateVPPAccount/UpdateVPPAccount.go b/examples/vpp_accounts/UpdateVPPAccount/UpdateVPPAccount.go index 4e0cd831..80df3484 100644 --- a/examples/vpp_accounts/UpdateVPPAccount/UpdateVPPAccount.go +++ b/examples/vpp_accounts/UpdateVPPAccount/UpdateVPPAccount.go @@ -30,7 +30,7 @@ func main() { } // Assume we are updating the account with ID 1 - updatedResponse, err := client.UpdateVPPAccountByID(1, updatedAccount) + updatedResponse, err := client.UpdateVPPAccountByID("1", updatedAccount) if err != nil { log.Fatalf("Error updating VPP account: %v", err) } diff --git a/examples/vpp_assignments/DeleteVPPAssignmentByID/DeleteVPPAssignmentByID.go b/examples/vpp_assignments/DeleteVPPAssignmentByID/DeleteVPPAssignmentByID.go index 705de391..22677d98 100644 --- a/examples/vpp_assignments/DeleteVPPAssignmentByID/DeleteVPPAssignmentByID.go +++ b/examples/vpp_assignments/DeleteVPPAssignmentByID/DeleteVPPAssignmentByID.go @@ -18,7 +18,7 @@ func main() { } // Specify the ID of the VPP assignment to delete - vppAssignmentID := 1 // Replace with the actual ID + vppAssignmentID := "1" // Replace with the actual ID // Call the DeleteVPPAssignmentByID function err = client.DeleteVPPAssignmentByID(vppAssignmentID) diff --git a/examples/vpp_assignments/GetVPPAssignmentByID/GetVPPAssignmentByID.go b/examples/vpp_assignments/GetVPPAssignmentByID/GetVPPAssignmentByID.go index 1c992424..b6581398 100644 --- a/examples/vpp_assignments/GetVPPAssignmentByID/GetVPPAssignmentByID.go +++ b/examples/vpp_assignments/GetVPPAssignmentByID/GetVPPAssignmentByID.go @@ -19,7 +19,7 @@ func main() { } // Specify the ID of the VPP assignment to retrieve - vppAssignmentID := 1 // Replace with the actual ID + vppAssignmentID := "1" // Replace with the actual ID // Call the GetVPPAssignmentByID function vppAssignment, err := client.GetVPPAssignmentByID(vppAssignmentID) diff --git a/examples/vpp_assignments/UpdateVPPAssignmentByID/UpdateVPPAssignmentByID.go b/examples/vpp_assignments/UpdateVPPAssignmentByID/UpdateVPPAssignmentByID.go index b419f77e..cc981fd0 100644 --- a/examples/vpp_assignments/UpdateVPPAssignmentByID/UpdateVPPAssignmentByID.go +++ b/examples/vpp_assignments/UpdateVPPAssignmentByID/UpdateVPPAssignmentByID.go @@ -18,7 +18,7 @@ func main() { } // Specify the ID of the VPP assignment to update - vppAssignmentID := 1 // Replace with the actual ID + vppAssignmentID := "1" // Replace with the actual ID // Define updated VPP assignment details updatedVPPAssignment := &jamfpro.ResourceVPPAssignment{ diff --git a/examples/webhooks/DeleteWebhookByID/DeleteWebhookByID.go b/examples/webhooks/DeleteWebhookByID/DeleteWebhookByID.go index ebd65f3a..fac7f59f 100644 --- a/examples/webhooks/DeleteWebhookByID/DeleteWebhookByID.go +++ b/examples/webhooks/DeleteWebhookByID/DeleteWebhookByID.go @@ -18,7 +18,7 @@ func main() { } // Example usage of DeleteWebhookByID - err = client.DeleteWebhookByID(1) // Replace with the desired webhook ID to delete + err = client.DeleteWebhookByID("1") // Replace with the desired webhook ID to delete if err != nil { fmt.Printf("Error deleting webhook by ID: %v\n", err) return diff --git a/examples/webhooks/GetWebhookByID/GetWebhookByID.go b/examples/webhooks/GetWebhookByID/GetWebhookByID.go index 2ee90549..dfec350d 100644 --- a/examples/webhooks/GetWebhookByID/GetWebhookByID.go +++ b/examples/webhooks/GetWebhookByID/GetWebhookByID.go @@ -19,7 +19,7 @@ func main() { } // Example usage of GetWebhookByID - webhookByID, err := client.GetWebhookByID(3) // Replace with the desired webhook ID + webhookByID, err := client.GetWebhookByID("3") // Replace with the desired webhook ID if err != nil { fmt.Printf("Error: %v\n", err) return diff --git a/examples/webhooks/UpdateWebhookByID/UpdateWebhookByID.go b/examples/webhooks/UpdateWebhookByID/UpdateWebhookByID.go index c92daf63..fdb0c128 100644 --- a/examples/webhooks/UpdateWebhookByID/UpdateWebhookByID.go +++ b/examples/webhooks/UpdateWebhookByID/UpdateWebhookByID.go @@ -33,7 +33,7 @@ func main() { } // Example usage of UpdateWebhookByID - updatedWebhookByID, err := client.UpdateWebhookByID(2, newWebhook) // Replace with the desired webhook ID + updatedWebhookByID, err := client.UpdateWebhookByID("1", newWebhook) // Replace with the desired webhook ID if err != nil { fmt.Printf("Error updating webhook by ID: %v\n", err) return