spartera_api_sdk 1.0.74 → 1.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile +9 -0
- data/README.md +333 -324
- data/Rakefile +10 -0
- data/docs/APIKeysApi.md +261 -87
- data/docs/Alerts.md +30 -0
- data/docs/AlertsApi.md +139 -139
- data/docs/AlertsInput.md +24 -0
- data/docs/AlertsUpdate.md +24 -0
- data/docs/ApiKeys.md +40 -0
- data/docs/ApiKeysInput.md +34 -0
- data/docs/ApiKeysUpdate.md +34 -0
- data/docs/AssetPriceHistory.md +30 -0
- data/docs/AssetPriceHistoryApi.md +162 -154
- data/docs/AssetPriceHistoryInput.md +24 -0
- data/docs/AssetPriceHistoryUpdate.md +24 -0
- data/docs/AssetUsecases.md +28 -0
- data/docs/AssetUsecasesApi.md +157 -0
- data/docs/Assets.md +138 -0
- data/docs/AssetsApi.md +534 -206
- data/docs/AssetsInput.md +124 -0
- data/docs/AssetsUpdate.md +124 -0
- data/docs/CloudProviders.md +28 -0
- data/docs/CloudProvidersApi.md +44 -31
- data/docs/CloudProvidersInput.md +22 -0
- data/docs/CloudProvidersUpdate.md +22 -0
- data/docs/Companies.md +46 -0
- data/docs/CompaniesApi.md +312 -144
- data/docs/CompaniesInput.md +40 -0
- data/docs/CompaniesUpdate.md +40 -0
- data/docs/Connections.md +38 -0
- data/docs/ConnectionsApi.md +149 -125
- data/docs/ConnectionsInput.md +32 -0
- data/docs/ConnectionsUpdate.md +32 -0
- data/docs/{CompaniesCompanyIdAssetsAssetIdGet200Response.md → CreateAlerts200Response.md} +3 -3
- data/docs/{CompaniesCompanyIdUsersUserIdAlertsPost200ResponseData.md → CreateAlerts200ResponseData.md} +2 -2
- data/docs/CreateApiKeys200Response.md +20 -0
- data/docs/CreateApiKeys200ResponseData.md +18 -0
- data/docs/{CompaniesCompanyIdConnectionsConnectionIdGet200Response.md → CreateAssetPriceHistory200Response.md} +3 -3
- data/docs/CreateAssetPriceHistory200ResponseData.md +18 -0
- data/docs/CreateAssetsAnalyze200Response.md +20 -0
- data/docs/{CompaniesCompanyIdAssetsPost200ResponseData.md → CreateAssetsAnalyze200ResponseData.md} +2 -2
- data/docs/CreateConnections200Response.md +20 -0
- data/docs/{CompaniesCompanyIdConnectionsPost200ResponseData.md → CreateConnections200ResponseData.md} +2 -2
- data/docs/CreateEndpoints200Response.md +20 -0
- data/docs/CreateEndpoints200ResponseData.md +18 -0
- data/docs/CreateFavorites200Response.md +20 -0
- data/docs/{CompaniesCompanyIdUsersUserIdFavoritesPost200ResponseData.md → CreateFavorites200ResponseData.md} +2 -2
- data/docs/CreatePostgenIntegrations200Response.md +20 -0
- data/docs/CreatePostgenIntegrations200ResponseData.md +18 -0
- data/docs/{CompaniesCompanyIdAssetsGet200Response.md → CreatePosts200Response.md} +3 -3
- data/docs/CreatePosts200ResponseData.md +18 -0
- data/docs/CreateUsers200Response.md +20 -0
- data/docs/{CompaniesCompanyIdUsersPost200ResponseData.md → CreateUsers200ResponseData.md} +2 -2
- data/docs/DeleteAlerts200Response.md +20 -0
- data/docs/{CompaniesCompanyIdUsersUserIdAlertsAlertIdDelete200ResponseData.md → DeleteAlerts200ResponseData.md} +2 -2
- data/docs/DeleteApiKeys200Response.md +20 -0
- data/docs/DeleteApiKeys200ResponseData.md +18 -0
- data/docs/DeleteAssetPriceHistory200Response.md +20 -0
- data/docs/DeleteAssetPriceHistory200ResponseData.md +18 -0
- data/docs/DeleteAssets200Response.md +20 -0
- data/docs/{CompaniesCompanyIdAssetsAssetIdDelete200ResponseData.md → DeleteAssets200ResponseData.md} +2 -2
- data/docs/DeleteConnections200Response.md +20 -0
- data/docs/{CompaniesCompanyIdConnectionsConnectionIdDelete200ResponseData.md → DeleteConnections200ResponseData.md} +2 -2
- data/docs/DeleteEndpoints200Response.md +20 -0
- data/docs/DeleteEndpoints200ResponseData.md +18 -0
- data/docs/DeleteFavorites200Response.md +20 -0
- data/docs/{CompaniesCompanyIdUsersUserIdFavoritesFavoriteIdDelete200ResponseData.md → DeleteFavorites200ResponseData.md} +2 -2
- data/docs/DeletePostgenIntegrations200Response.md +20 -0
- data/docs/DeletePostgenIntegrations200ResponseData.md +18 -0
- data/docs/DeletePosts200Response.md +20 -0
- data/docs/DeletePosts200ResponseData.md +18 -0
- data/docs/DeleteUsers200Response.md +20 -0
- data/docs/{CompaniesCompanyIdUsersUserIdDelete200ResponseData.md → DeleteUsers200ResponseData.md} +2 -2
- data/docs/Endpoints.md +80 -0
- data/docs/EndpointsApi.md +1043 -0
- data/docs/EndpointsInput.md +78 -0
- data/docs/EndpointsUpdate.md +78 -0
- data/docs/Favorites.md +34 -0
- data/docs/FavoritesApi.md +159 -159
- data/docs/FavoritesInput.md +28 -0
- data/docs/FavoritesUpdate.md +28 -0
- data/docs/{CompaniesCompanyIdUsersUserIdGet200Response.md → GetAlertsById200Response.md} +3 -3
- data/docs/{CompaniesCompanyIdUsersGet200Response.md → GetApiKeysById200Response.md} +3 -3
- data/docs/GetAssetPriceHistoryById200Response.md +20 -0
- data/docs/GetAssetUsecasesById200Response.md +20 -0
- data/docs/GetAssetsByIdAnalyze200Response.md +20 -0
- data/docs/GetCloudProvidersById200Response.md +20 -0
- data/docs/GetCompaniesById200Response.md +20 -0
- data/docs/GetConnectionsById200Response.md +20 -0
- data/docs/GetEndpointsByIdConnectionsDescribe200Response.md +20 -0
- data/docs/GetFavoritesById200Response.md +20 -0
- data/docs/GetIndustriesById200Response.md +20 -0
- data/docs/GetJobFunctionsById200Response.md +20 -0
- data/docs/GetPostgenIntegrationsById200Response.md +20 -0
- data/docs/GetPostsById200Response.md +20 -0
- data/docs/GetStorageEnginesById200Response.md +20 -0
- data/docs/GetUsersById200Response.md +20 -0
- data/docs/Industries.md +32 -0
- data/docs/IndustriesApi.md +237 -0
- data/docs/InlineObject4.md +20 -0
- data/docs/InlineObject5.md +20 -0
- data/docs/InlineObject6.md +22 -0
- data/docs/InlineObject7.md +20 -0
- data/docs/JobFunctions.md +24 -0
- data/docs/JobFunctionsApi.md +157 -0
- data/docs/JobFunctionsInput.md +18 -0
- data/docs/JobFunctionsUpdate.md +18 -0
- data/docs/ListApiKeys200Response.md +20 -0
- data/docs/ListAssetUsecases200Response.md +20 -0
- data/docs/ListAssets200Response.md +20 -0
- data/docs/ListCloudProviders200Response.md +20 -0
- data/docs/{CompaniesCompanyIdApiKeysGet200Response.md → ListCompaniesAnalyticsAssets200Response.md} +3 -3
- data/docs/ListConnections200Response.md +20 -0
- data/docs/ListEndpoints200Response.md +20 -0
- data/docs/ListIndustries200Response.md +20 -0
- data/docs/ListJobFunctions200Response.md +20 -0
- data/docs/{CompaniesCompanyIdConnectionsGet200Response.md → ListPostgenIntegrations200Response.md} +3 -3
- data/docs/ListPosts200Response.md +20 -0
- data/docs/ListStorageEngines200Response.md +20 -0
- data/docs/ListUsers200Response.md +20 -0
- data/docs/PostPublications.md +40 -0
- data/docs/PostPublicationsInput.md +34 -0
- data/docs/PostPublicationsUpdate.md +34 -0
- data/docs/PostgenIntegrations.md +36 -0
- data/docs/PostgenIntegrationsApi.md +463 -0
- data/docs/PostgenIntegrationsInput.md +30 -0
- data/docs/PostgenIntegrationsUpdate.md +30 -0
- data/docs/Posts.md +68 -0
- data/docs/PostsApi.md +843 -0
- data/docs/PostsInput.md +62 -0
- data/docs/PostsUpdate.md +62 -0
- data/docs/StorageEngines.md +32 -0
- data/docs/StorageEnginesApi.md +40 -28
- data/docs/UpdateAlerts200Response.md +20 -0
- data/docs/{CompaniesCompanyIdUsersUserIdAlertsAlertIdPatch200ResponseData.md → UpdateAlerts200ResponseData.md} +2 -2
- data/docs/UpdateApiKeys200Response.md +20 -0
- data/docs/UpdateApiKeys200ResponseData.md +18 -0
- data/docs/UpdateAssetPriceHistory200Response.md +20 -0
- data/docs/UpdateAssetPriceHistory200ResponseData.md +18 -0
- data/docs/UpdateAssets200Response.md +20 -0
- data/docs/{CompaniesCompanyIdAssetsAssetIdPatch200ResponseData.md → UpdateAssets200ResponseData.md} +2 -2
- data/docs/UpdateCompanies200Response.md +20 -0
- data/docs/UpdateCompanies200ResponseData.md +18 -0
- data/docs/UpdateConnections200Response.md +20 -0
- data/docs/{CompaniesCompanyIdConnectionsConnectionIdPatch200ResponseData.md → UpdateConnections200ResponseData.md} +2 -2
- data/docs/UpdateEndpoints200Response.md +20 -0
- data/docs/UpdateEndpoints200ResponseData.md +18 -0
- data/docs/UpdateFavorites200Response.md +20 -0
- data/docs/{CompaniesCompanyIdUsersUserIdFavoritesFavoriteIdPatch200ResponseData.md → UpdateFavorites200ResponseData.md} +2 -2
- data/docs/UpdatePostgenIntegrations200Response.md +20 -0
- data/docs/UpdatePostgenIntegrations200ResponseData.md +18 -0
- data/docs/UpdatePosts200Response.md +20 -0
- data/docs/UpdatePosts200ResponseData.md +18 -0
- data/docs/UpdateUsers200Response.md +20 -0
- data/docs/{CompaniesCompanyIdUsersUserIdPatch200ResponseData.md → UpdateUsers200ResponseData.md} +2 -2
- data/docs/Users.md +36 -0
- data/docs/UsersApi.md +306 -101
- data/docs/UsersInput.md +30 -0
- data/docs/UsersUpdate.md +30 -0
- data/git_push.sh +57 -0
- data/lib/spartera_api_sdk/api/alerts_api.rb +414 -167
- data/lib/spartera_api_sdk/api/api_keys_api.rb +491 -90
- data/lib/spartera_api_sdk/api/asset_price_history_api.rb +460 -169
- data/lib/spartera_api_sdk/api/asset_usecases_api.rb +190 -0
- data/lib/spartera_api_sdk/api/assets_api.rb +952 -228
- data/lib/spartera_api_sdk/api/cloud_providers_api.rb +83 -31
- data/lib/spartera_api_sdk/api/companies_api.rb +651 -137
- data/lib/spartera_api_sdk/api/connections_api.rb +376 -142
- data/lib/spartera_api_sdk/api/endpoints_api.rb +1416 -0
- data/lib/spartera_api_sdk/api/favorites_api.rb +456 -196
- data/lib/spartera_api_sdk/api/industries_api.rb +284 -0
- data/lib/spartera_api_sdk/api/job_functions_api.rb +190 -0
- data/lib/spartera_api_sdk/api/postgen_integrations_api.rb +634 -0
- data/lib/spartera_api_sdk/api/posts_api.rb +1190 -0
- data/lib/spartera_api_sdk/api/storage_engines_api.rb +107 -29
- data/lib/spartera_api_sdk/api/users_api.rb +581 -112
- data/lib/spartera_api_sdk/api_client.rb +8 -4
- data/lib/spartera_api_sdk/api_error.rb +2 -2
- data/lib/spartera_api_sdk/api_model_base.rb +88 -0
- data/lib/spartera_api_sdk/configuration.rb +2 -2
- data/lib/spartera_api_sdk/models/{alert.rb → alerts.rb} +46 -139
- data/lib/spartera_api_sdk/models/alerts_input.rb +213 -0
- data/lib/spartera_api_sdk/models/alerts_update.rb +179 -0
- data/lib/spartera_api_sdk/models/{apikey.rb → api_keys.rb} +98 -124
- data/lib/spartera_api_sdk/models/api_keys_input.rb +263 -0
- data/lib/spartera_api_sdk/models/api_keys_update.rb +229 -0
- data/lib/spartera_api_sdk/models/asset_price_history.rb +209 -0
- data/lib/spartera_api_sdk/models/asset_price_history_input.rb +179 -0
- data/lib/spartera_api_sdk/models/asset_price_history_update.rb +179 -0
- data/lib/spartera_api_sdk/models/asset_usecases.rb +216 -0
- data/lib/spartera_api_sdk/models/assets.rb +1048 -0
- data/lib/spartera_api_sdk/models/assets_input.rb +898 -0
- data/lib/spartera_api_sdk/models/assets_update.rb +857 -0
- data/lib/spartera_api_sdk/models/{cloudprovider.rb → cloud_providers.rb} +35 -111
- data/lib/spartera_api_sdk/models/cloud_providers_input.rb +186 -0
- data/lib/spartera_api_sdk/models/cloud_providers_update.rb +169 -0
- data/lib/spartera_api_sdk/models/{company.rb → companies.rb} +90 -105
- data/lib/spartera_api_sdk/models/companies_input.rb +327 -0
- data/lib/spartera_api_sdk/models/companies_update.rb +293 -0
- data/lib/spartera_api_sdk/models/{connection.rb → connections.rb} +69 -186
- data/lib/spartera_api_sdk/models/connections_input.rb +287 -0
- data/lib/spartera_api_sdk/models/connections_update.rb +253 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_users_user_id_get200_response.rb → create_alerts200_response.rb} +6 -79
- data/lib/spartera_api_sdk/models/{companies_company_id_users_user_id_alerts_post200_response_data.rb → create_alerts200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/{companies_company_id_assets_asset_id_get200_response.rb → create_api_keys200_response.rb} +6 -79
- data/lib/spartera_api_sdk/models/{me_get200_response_api_key_info.rb → create_api_keys200_response_data.rb} +27 -94
- data/lib/spartera_api_sdk/models/{companies_company_id_users_post200_response.rb → create_asset_price_history200_response.rb} +6 -79
- data/lib/spartera_api_sdk/models/create_asset_price_history200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/create_assets_analyze200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_assets_post200_response_data.rb → create_assets_analyze200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/create_connections200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_connections_post200_response_data.rb → create_connections200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/create_endpoints200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/create_endpoints200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/create_favorites200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_users_user_id_favorites_post200_response_data.rb → create_favorites200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/create_postgen_integrations200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/create_postgen_integrations200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/create_posts200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/create_posts200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/create_users200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_users_post200_response_data.rb → create_users200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/delete_alerts200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_users_user_id_alerts_alert_id_delete200_response_data.rb → delete_alerts200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/delete_api_keys200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_api_keys200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_asset_price_history200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_asset_price_history200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_assets200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_assets_asset_id_delete200_response_data.rb → delete_assets200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/delete_connections200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_connections_connection_id_delete200_response_data.rb → delete_connections200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/delete_endpoints200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_endpoints200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_favorites200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_users_user_id_favorites_favorite_id_delete200_response_data.rb → delete_favorites200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/delete_postgen_integrations200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_postgen_integrations200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_posts200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/delete_posts200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/delete_users200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_users_user_id_delete200_response_data.rb → delete_users200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/endpoints.rb +684 -0
- data/lib/spartera_api_sdk/models/endpoints_input.rb +582 -0
- data/lib/spartera_api_sdk/models/endpoints_update.rb +531 -0
- data/lib/spartera_api_sdk/models/error.rb +3 -76
- data/lib/spartera_api_sdk/models/{favorite.rb → favorites.rb} +38 -111
- data/lib/spartera_api_sdk/models/favorites_input.rb +233 -0
- data/lib/spartera_api_sdk/models/favorites_update.rb +199 -0
- data/lib/spartera_api_sdk/models/get_alerts_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_api_keys_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_asset_price_history_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_asset_usecases_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_assets_by_id_analyze200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_cloud_providers_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_companies_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_connections_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_users_user_id_delete200_response.rb → get_endpoints_by_id_connections_describe200_response.rb} +6 -79
- data/lib/spartera_api_sdk/models/get_favorites_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_industries_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_job_functions_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_users_get200_response.rb → get_postgen_integrations_by_id200_response.rb} +7 -82
- data/lib/spartera_api_sdk/models/get_posts_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_storage_engines_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/get_users_by_id200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/industries.rb +253 -0
- data/lib/spartera_api_sdk/models/inline_object.rb +3 -76
- data/lib/spartera_api_sdk/models/inline_object1.rb +3 -76
- data/lib/spartera_api_sdk/models/inline_object2.rb +3 -76
- data/lib/spartera_api_sdk/models/inline_object3.rb +3 -76
- data/lib/spartera_api_sdk/models/inline_object4.rb +156 -0
- data/lib/spartera_api_sdk/models/inline_object5.rb +156 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_api_keys_get200_response.rb → inline_object6.rb} +22 -104
- data/lib/spartera_api_sdk/models/inline_object7.rb +156 -0
- data/lib/spartera_api_sdk/models/job_functions.rb +213 -0
- data/lib/spartera_api_sdk/models/job_functions_input.rb +166 -0
- data/lib/spartera_api_sdk/models/job_functions_update.rb +149 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_assets_get200_response.rb → list_api_keys200_response.rb} +6 -79
- data/lib/spartera_api_sdk/models/{companies_company_id_connections_get200_response.rb → list_asset_usecases200_response.rb} +6 -79
- data/lib/spartera_api_sdk/models/{companies_company_id_users_user_id_alerts_get200_response.rb → list_assets200_response.rb} +6 -79
- data/lib/spartera_api_sdk/models/list_cloud_providers200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_assets_post200_response.rb → list_companies_analytics_assets200_response.rb} +9 -80
- data/lib/spartera_api_sdk/models/list_connections200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_endpoints200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_industries200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_job_functions200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_postgen_integrations200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_posts200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_storage_engines200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/list_users200_response.rb +193 -0
- data/lib/spartera_api_sdk/models/post_publications.rb +327 -0
- data/lib/spartera_api_sdk/models/post_publications_input.rb +280 -0
- data/lib/spartera_api_sdk/models/post_publications_update.rb +229 -0
- data/lib/spartera_api_sdk/models/postgen_integrations.rb +341 -0
- data/lib/spartera_api_sdk/models/postgen_integrations_input.rb +294 -0
- data/lib/spartera_api_sdk/models/postgen_integrations_update.rb +209 -0
- data/lib/spartera_api_sdk/models/posts.rb +586 -0
- data/lib/spartera_api_sdk/models/posts_input.rb +437 -0
- data/lib/spartera_api_sdk/models/posts_update.rb +369 -0
- data/lib/spartera_api_sdk/models/storage_engines.rb +294 -0
- data/lib/spartera_api_sdk/models/update_alerts200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_users_user_id_alerts_alert_id_patch200_response_data.rb → update_alerts200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/update_api_keys200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_api_keys200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_asset_price_history200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_asset_price_history200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_assets200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_assets_asset_id_patch200_response_data.rb → update_assets200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/update_companies200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_companies200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_connections200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_connections_connection_id_patch200_response_data.rb → update_connections200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/update_endpoints200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_endpoints200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_favorites200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_users_user_id_favorites_favorite_id_patch200_response_data.rb → update_favorites200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/update_postgen_integrations200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_postgen_integrations200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_posts200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/update_posts200_response_data.rb +165 -0
- data/lib/spartera_api_sdk/models/update_users200_response.rb +191 -0
- data/lib/spartera_api_sdk/models/{companies_company_id_users_user_id_patch200_response_data.rb → update_users200_response_data.rb} +5 -78
- data/lib/spartera_api_sdk/models/{user.rb → users.rb} +112 -108
- data/lib/spartera_api_sdk/models/{me_get200_response_profile.rb → users_input.rb} +54 -139
- data/lib/spartera_api_sdk/models/{me_get200_response_token_metadata.rb → users_update.rb} +101 -110
- data/lib/spartera_api_sdk/version.rb +13 -1
- data/lib/spartera_api_sdk.rb +149 -56
- data/spartera_api_sdk.gemspec +39 -0
- data/spec/api/alerts_api_spec.rb +50 -50
- data/spec/api/api_keys_api_spec.rb +67 -30
- data/spec/api/asset_price_history_api_spec.rb +57 -53
- data/spec/api/asset_usecases_api_spec.rb +61 -0
- data/spec/api/assets_api_spec.rb +134 -69
- data/spec/api/cloud_providers_api_spec.rb +16 -11
- data/spec/api/companies_api_spec.rb +99 -47
- data/spec/api/connections_api_spec.rb +53 -43
- data/spec/api/endpoints_api_spec.rb +215 -0
- data/spec/api/favorites_api_spec.rb +56 -56
- data/spec/api/industries_api_spec.rb +76 -0
- data/spec/api/job_functions_api_spec.rb +61 -0
- data/spec/api/postgen_integrations_api_spec.rb +117 -0
- data/spec/api/posts_api_spec.rb +186 -0
- data/spec/api/storage_engines_api_spec.rb +16 -11
- data/spec/api/users_api_spec.rb +83 -34
- data/spec/models/{me_get200_response_token_metadata_spec.rb → alerts_input_spec.rb} +12 -12
- data/spec/models/alerts_spec.rb +72 -0
- data/spec/models/alerts_update_spec.rb +54 -0
- data/spec/models/{apikey_spec.rb → api_keys_input_spec.rb} +14 -20
- data/spec/models/{assetpricehistory_spec.rb → api_keys_spec.rb} +25 -19
- data/spec/models/{user_spec.rb → api_keys_update_spec.rb} +15 -15
- data/spec/models/asset_price_history_input_spec.rb +54 -0
- data/spec/models/asset_price_history_spec.rb +72 -0
- data/spec/models/asset_price_history_update_spec.rb +54 -0
- data/spec/models/asset_usecases_spec.rb +66 -0
- data/spec/models/{asset_spec.rb → assets_input_spec.rb} +122 -28
- data/spec/models/assets_spec.rb +452 -0
- data/spec/models/assets_update_spec.rb +406 -0
- data/spec/models/{companies_company_id_assets_asset_id_get200_response_spec.rb → cloud_providers_input_spec.rb} +16 -10
- data/spec/models/{cloudprovider_spec.rb → cloud_providers_spec.rb} +14 -20
- data/spec/models/{companies_company_id_assets_asset_id_delete200_response_spec.rb → cloud_providers_update_spec.rb} +16 -10
- data/spec/models/companies_input_spec.rb +106 -0
- data/spec/models/{company_spec.rb → companies_spec.rb} +26 -16
- data/spec/models/companies_update_spec.rb +106 -0
- data/spec/models/connections_input_spec.rb +82 -0
- data/spec/models/{me_get200_response_spec.rb → connections_spec.rb} +28 -22
- data/spec/models/connections_update_spec.rb +82 -0
- data/spec/models/create_alerts200_response_data_spec.rb +36 -0
- data/spec/models/create_alerts200_response_spec.rb +42 -0
- data/spec/models/create_api_keys200_response_data_spec.rb +36 -0
- data/spec/models/create_api_keys200_response_spec.rb +42 -0
- data/spec/models/create_asset_price_history200_response_data_spec.rb +36 -0
- data/spec/models/{companies_company_id_assets_post200_response_spec.rb → create_asset_price_history200_response_spec.rb} +8 -8
- data/spec/models/{companies_company_id_assets_post200_response_data_spec.rb → create_assets_analyze200_response_data_spec.rb} +8 -8
- data/spec/models/{companies_company_id_users_post200_response_spec.rb → create_assets_analyze200_response_spec.rb} +8 -8
- data/spec/models/{companies_company_id_connections_post200_response_data_spec.rb → create_connections200_response_data_spec.rb} +8 -8
- data/spec/models/create_connections200_response_spec.rb +42 -0
- data/spec/models/create_endpoints200_response_data_spec.rb +36 -0
- data/spec/models/create_endpoints200_response_spec.rb +42 -0
- data/spec/models/create_favorites200_response_data_spec.rb +36 -0
- data/spec/models/create_favorites200_response_spec.rb +42 -0
- data/spec/models/create_postgen_integrations200_response_data_spec.rb +36 -0
- data/spec/models/create_postgen_integrations200_response_spec.rb +42 -0
- data/spec/models/create_posts200_response_data_spec.rb +36 -0
- data/spec/models/create_posts200_response_spec.rb +42 -0
- data/spec/models/{companies_company_id_users_post200_response_data_spec.rb → create_users200_response_data_spec.rb} +8 -8
- data/spec/models/create_users200_response_spec.rb +42 -0
- data/spec/models/delete_alerts200_response_data_spec.rb +36 -0
- data/spec/models/delete_alerts200_response_spec.rb +42 -0
- data/spec/models/delete_api_keys200_response_data_spec.rb +36 -0
- data/spec/models/delete_api_keys200_response_spec.rb +42 -0
- data/spec/models/delete_asset_price_history200_response_data_spec.rb +36 -0
- data/spec/models/delete_asset_price_history200_response_spec.rb +42 -0
- data/spec/models/{companies_company_id_assets_asset_id_patch200_response_data_spec.rb → delete_assets200_response_data_spec.rb} +8 -8
- data/spec/models/delete_assets200_response_spec.rb +42 -0
- data/spec/models/delete_connections200_response_data_spec.rb +36 -0
- data/spec/models/delete_connections200_response_spec.rb +42 -0
- data/spec/models/delete_endpoints200_response_data_spec.rb +36 -0
- data/spec/models/delete_endpoints200_response_spec.rb +42 -0
- data/spec/models/delete_favorites200_response_data_spec.rb +36 -0
- data/spec/models/delete_favorites200_response_spec.rb +42 -0
- data/spec/models/delete_postgen_integrations200_response_data_spec.rb +36 -0
- data/spec/models/delete_postgen_integrations200_response_spec.rb +42 -0
- data/spec/models/delete_posts200_response_data_spec.rb +36 -0
- data/spec/models/delete_posts200_response_spec.rb +42 -0
- data/spec/models/{companies_company_id_users_user_id_patch200_response_data_spec.rb → delete_users200_response_data_spec.rb} +8 -8
- data/spec/models/delete_users200_response_spec.rb +42 -0
- data/spec/models/endpoints_input_spec.rb +236 -0
- data/spec/models/endpoints_spec.rb +242 -0
- data/spec/models/endpoints_update_spec.rb +236 -0
- data/spec/models/error_spec.rb +3 -3
- data/spec/models/favorites_input_spec.rb +66 -0
- data/spec/models/{favorite_spec.rb → favorites_spec.rb} +17 -23
- data/spec/models/favorites_update_spec.rb +66 -0
- data/spec/models/get_alerts_by_id200_response_spec.rb +42 -0
- data/spec/models/{companies_company_id_assets_get200_response_spec.rb → get_api_keys_by_id200_response_spec.rb} +8 -8
- data/spec/models/get_asset_price_history_by_id200_response_spec.rb +42 -0
- data/spec/models/get_asset_usecases_by_id200_response_spec.rb +42 -0
- data/spec/models/get_assets_by_id_analyze200_response_spec.rb +42 -0
- data/spec/models/get_cloud_providers_by_id200_response_spec.rb +42 -0
- data/spec/models/get_companies_by_id200_response_spec.rb +42 -0
- data/spec/models/get_connections_by_id200_response_spec.rb +42 -0
- data/spec/models/{companies_company_id_users_user_id_delete200_response_spec.rb → get_endpoints_by_id_connections_describe200_response_spec.rb} +8 -8
- data/spec/models/get_favorites_by_id200_response_spec.rb +42 -0
- data/spec/models/get_industries_by_id200_response_spec.rb +42 -0
- data/spec/models/get_job_functions_by_id200_response_spec.rb +42 -0
- data/spec/models/{companies_company_id_users_get200_response_spec.rb → get_postgen_integrations_by_id200_response_spec.rb} +8 -8
- data/spec/models/get_posts_by_id200_response_spec.rb +42 -0
- data/spec/models/get_storage_engines_by_id200_response_spec.rb +42 -0
- data/spec/models/get_users_by_id200_response_spec.rb +42 -0
- data/spec/models/industries_spec.rb +78 -0
- data/spec/models/inline_object1_spec.rb +3 -3
- data/spec/models/inline_object2_spec.rb +3 -3
- data/spec/models/inline_object3_spec.rb +3 -3
- data/spec/models/inline_object4_spec.rb +42 -0
- data/spec/models/inline_object5_spec.rb +42 -0
- data/spec/models/{companies_company_id_connections_get200_response_spec.rb → inline_object6_spec.rb} +15 -9
- data/spec/models/inline_object7_spec.rb +42 -0
- data/spec/models/inline_object_spec.rb +3 -3
- data/spec/models/job_functions_input_spec.rb +36 -0
- data/spec/models/job_functions_spec.rb +54 -0
- data/spec/models/job_functions_update_spec.rb +36 -0
- data/spec/models/list_api_keys200_response_spec.rb +42 -0
- data/spec/models/list_asset_usecases200_response_spec.rb +42 -0
- data/spec/models/list_assets200_response_spec.rb +42 -0
- data/spec/models/list_cloud_providers200_response_spec.rb +42 -0
- data/spec/models/{companies_company_id_api_keys_get200_response_spec.rb → list_companies_analytics_assets200_response_spec.rb} +8 -8
- data/spec/models/list_connections200_response_spec.rb +42 -0
- data/spec/models/list_endpoints200_response_spec.rb +42 -0
- data/spec/models/list_industries200_response_spec.rb +42 -0
- data/spec/models/list_job_functions200_response_spec.rb +42 -0
- data/spec/models/list_postgen_integrations200_response_spec.rb +42 -0
- data/spec/models/list_posts200_response_spec.rb +42 -0
- data/spec/models/list_storage_engines200_response_spec.rb +42 -0
- data/spec/models/list_users200_response_spec.rb +42 -0
- data/spec/models/post_publications_input_spec.rb +84 -0
- data/spec/models/post_publications_spec.rb +102 -0
- data/spec/models/post_publications_update_spec.rb +84 -0
- data/spec/models/postgen_integrations_input_spec.rb +72 -0
- data/spec/models/{alert_spec.rb → postgen_integrations_spec.rb} +17 -17
- data/spec/models/postgen_integrations_update_spec.rb +72 -0
- data/spec/models/{connection_spec.rb → posts_input_spec.rb} +51 -27
- data/spec/models/posts_spec.rb +186 -0
- data/spec/models/posts_update_spec.rb +168 -0
- data/spec/models/storage_engines_spec.rb +82 -0
- data/spec/models/update_alerts200_response_data_spec.rb +36 -0
- data/spec/models/update_alerts200_response_spec.rb +42 -0
- data/spec/models/update_api_keys200_response_data_spec.rb +36 -0
- data/spec/models/update_api_keys200_response_spec.rb +42 -0
- data/spec/models/update_asset_price_history200_response_data_spec.rb +36 -0
- data/spec/models/update_asset_price_history200_response_spec.rb +42 -0
- data/spec/models/update_assets200_response_data_spec.rb +36 -0
- data/spec/models/update_assets200_response_spec.rb +42 -0
- data/spec/models/update_companies200_response_data_spec.rb +36 -0
- data/spec/models/update_companies200_response_spec.rb +42 -0
- data/spec/models/update_connections200_response_data_spec.rb +36 -0
- data/spec/models/update_connections200_response_spec.rb +42 -0
- data/spec/models/update_endpoints200_response_data_spec.rb +36 -0
- data/spec/models/update_endpoints200_response_spec.rb +42 -0
- data/spec/models/update_favorites200_response_data_spec.rb +36 -0
- data/spec/models/update_favorites200_response_spec.rb +42 -0
- data/spec/models/update_postgen_integrations200_response_data_spec.rb +36 -0
- data/spec/models/update_postgen_integrations200_response_spec.rb +42 -0
- data/spec/models/update_posts200_response_data_spec.rb +36 -0
- data/spec/models/update_posts200_response_spec.rb +42 -0
- data/spec/models/{companies_company_id_users_user_id_delete200_response_data_spec.rb → update_users200_response_data_spec.rb} +8 -8
- data/spec/models/update_users200_response_spec.rb +42 -0
- data/spec/models/users_input_spec.rb +76 -0
- data/spec/models/{me_get200_response_profile_spec.rb → users_spec.rb} +22 -22
- data/spec/models/users_update_spec.rb +76 -0
- data/spec/spec_helper.rb +2 -2
- metadata +623 -283
- data/docs/Alert.md +0 -36
- data/docs/Apikey.md +0 -36
- data/docs/Asset.md +0 -110
- data/docs/Assetpricehistory.md +0 -38
- data/docs/Cloudprovider.md +0 -30
- data/docs/CompaniesCompanyIdAssetsAssetIdDelete200Response.md +0 -20
- data/docs/CompaniesCompanyIdAssetsAssetIdPatch200Response.md +0 -20
- data/docs/CompaniesCompanyIdAssetsPost200Response.md +0 -20
- data/docs/CompaniesCompanyIdConnectionsConnectionIdDelete200Response.md +0 -20
- data/docs/CompaniesCompanyIdConnectionsConnectionIdPatch200Response.md +0 -20
- data/docs/CompaniesCompanyIdConnectionsPost200Response.md +0 -20
- data/docs/CompaniesCompanyIdUsersPost200Response.md +0 -20
- data/docs/CompaniesCompanyIdUsersUserIdAlertsAlertIdDelete200Response.md +0 -20
- data/docs/CompaniesCompanyIdUsersUserIdAlertsAlertIdGet200Response.md +0 -20
- data/docs/CompaniesCompanyIdUsersUserIdAlertsAlertIdPatch200Response.md +0 -20
- data/docs/CompaniesCompanyIdUsersUserIdAlertsGet200Response.md +0 -20
- data/docs/CompaniesCompanyIdUsersUserIdAlertsPost200Response.md +0 -20
- data/docs/CompaniesCompanyIdUsersUserIdDelete200Response.md +0 -20
- data/docs/CompaniesCompanyIdUsersUserIdFavoritesFavoriteIdDelete200Response.md +0 -20
- data/docs/CompaniesCompanyIdUsersUserIdFavoritesFavoriteIdGet200Response.md +0 -20
- data/docs/CompaniesCompanyIdUsersUserIdFavoritesFavoriteIdPatch200Response.md +0 -20
- data/docs/CompaniesCompanyIdUsersUserIdFavoritesGet200Response.md +0 -20
- data/docs/CompaniesCompanyIdUsersUserIdFavoritesPost200Response.md +0 -20
- data/docs/CompaniesCompanyIdUsersUserIdPatch200Response.md +0 -20
- data/docs/Company.md +0 -44
- data/docs/Connection.md +0 -54
- data/docs/Favorite.md +0 -36
- data/docs/MeGet200Response.md +0 -36
- data/docs/MeGet200ResponseApiKeyInfo.md +0 -20
- data/docs/MeGet200ResponseProfile.md +0 -36
- data/docs/MeGet200ResponseTokenMetadata.md +0 -24
- data/docs/User.md +0 -34
- data/example.rb +0 -51
- data/lib/spartera_api_sdk/models/asset.rb +0 -686
- data/lib/spartera_api_sdk/models/assetpricehistory.rb +0 -345
- data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_delete200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_patch200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/companies_company_id_connections_connection_id_delete200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/companies_company_id_connections_connection_id_get200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/companies_company_id_connections_connection_id_patch200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/companies_company_id_connections_post200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_delete200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_get200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_patch200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_post200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_delete200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_get200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_patch200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_get200_response.rb +0 -266
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_post200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_patch200_response.rb +0 -264
- data/lib/spartera_api_sdk/models/me_get200_response.rb +0 -417
- data/spec/models/companies_company_id_assets_asset_id_delete200_response_data_spec.rb +0 -36
- data/spec/models/companies_company_id_assets_asset_id_patch200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_connections_connection_id_delete200_response_data_spec.rb +0 -36
- data/spec/models/companies_company_id_connections_connection_id_delete200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_connections_connection_id_get200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_connections_connection_id_patch200_response_data_spec.rb +0 -36
- data/spec/models/companies_company_id_connections_connection_id_patch200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_connections_post200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_users_user_id_alerts_alert_id_delete200_response_data_spec.rb +0 -36
- data/spec/models/companies_company_id_users_user_id_alerts_alert_id_delete200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_users_user_id_alerts_alert_id_get200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_users_user_id_alerts_alert_id_patch200_response_data_spec.rb +0 -36
- data/spec/models/companies_company_id_users_user_id_alerts_alert_id_patch200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_users_user_id_alerts_get200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_users_user_id_alerts_post200_response_data_spec.rb +0 -36
- data/spec/models/companies_company_id_users_user_id_alerts_post200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_users_user_id_favorites_favorite_id_delete200_response_data_spec.rb +0 -36
- data/spec/models/companies_company_id_users_user_id_favorites_favorite_id_delete200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_users_user_id_favorites_favorite_id_get200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_users_user_id_favorites_favorite_id_patch200_response_data_spec.rb +0 -36
- data/spec/models/companies_company_id_users_user_id_favorites_favorite_id_patch200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_users_user_id_favorites_get200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_users_user_id_favorites_post200_response_data_spec.rb +0 -36
- data/spec/models/companies_company_id_users_user_id_favorites_post200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_users_user_id_get200_response_spec.rb +0 -42
- data/spec/models/companies_company_id_users_user_id_patch200_response_spec.rb +0 -42
- data/spec/models/me_get200_response_api_key_info_spec.rb +0 -42
|
@@ -0,0 +1,1190 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Spartera API Documentation
|
|
3
|
+
|
|
4
|
+
#Auto-generated API documentation for REST services of the Spartera platform
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.25.0
|
|
7
|
+
Contact: support@spartera.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module SparteraApiSdk
|
|
16
|
+
class PostsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# POST /companies/{company_id}/posts
|
|
23
|
+
# @param company_id [String] Unique identifier for the Company
|
|
24
|
+
# @param posts_input [PostsInput]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
27
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
28
|
+
# @option opts [String] :sort_by Field to sort by
|
|
29
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
30
|
+
# @option opts [String] :search Search term to filter results
|
|
31
|
+
# @return [CreatePosts200Response]
|
|
32
|
+
def create_posts(company_id, posts_input, opts = {})
|
|
33
|
+
data, _status_code, _headers = create_posts_with_http_info(company_id, posts_input, opts)
|
|
34
|
+
data
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# POST /companies/{company_id}/posts
|
|
38
|
+
# @param company_id [String] Unique identifier for the Company
|
|
39
|
+
# @param posts_input [PostsInput]
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
42
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
43
|
+
# @option opts [String] :sort_by Field to sort by
|
|
44
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
45
|
+
# @option opts [String] :search Search term to filter results
|
|
46
|
+
# @return [Array<(CreatePosts200Response, Integer, Hash)>] CreatePosts200Response data, response status code and response headers
|
|
47
|
+
def create_posts_with_http_info(company_id, posts_input, opts = {})
|
|
48
|
+
if @api_client.config.debugging
|
|
49
|
+
@api_client.config.logger.debug 'Calling API: PostsApi.create_posts ...'
|
|
50
|
+
end
|
|
51
|
+
# verify the required parameter 'company_id' is set
|
|
52
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
53
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling PostsApi.create_posts"
|
|
54
|
+
end
|
|
55
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
56
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.create_posts, the character length must be smaller than or equal to 255.'
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
60
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.create_posts, the character length must be greater than or equal to 1.'
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
64
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
65
|
+
fail ArgumentError, "invalid value for 'company_id' when calling PostsApi.create_posts, must conform to the pattern #{pattern}."
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# verify the required parameter 'posts_input' is set
|
|
69
|
+
if @api_client.config.client_side_validation && posts_input.nil?
|
|
70
|
+
fail ArgumentError, "Missing the required parameter 'posts_input' when calling PostsApi.create_posts"
|
|
71
|
+
end
|
|
72
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
73
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling PostsApi.create_posts, must be greater than or equal to 1.'
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
77
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PostsApi.create_posts, must be smaller than or equal to 100.'
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
81
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PostsApi.create_posts, must be greater than or equal to 1.'
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
allowable_values = ["asc", "desc"]
|
|
85
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
86
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
87
|
+
end
|
|
88
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
89
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling PostsApi.create_posts, the character length must be smaller than or equal to 255.'
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
93
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling PostsApi.create_posts, the character length must be greater than or equal to 1.'
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# resource path
|
|
97
|
+
local_var_path = '/companies/{company_id}/posts'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
98
|
+
|
|
99
|
+
# query parameters
|
|
100
|
+
query_params = opts[:query_params] || {}
|
|
101
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
102
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
103
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
104
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
105
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
106
|
+
|
|
107
|
+
# header parameters
|
|
108
|
+
header_params = opts[:header_params] || {}
|
|
109
|
+
# HTTP header 'Accept' (if needed)
|
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
111
|
+
# HTTP header 'Content-Type'
|
|
112
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
113
|
+
if !content_type.nil?
|
|
114
|
+
header_params['Content-Type'] = content_type
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# form parameters
|
|
118
|
+
form_params = opts[:form_params] || {}
|
|
119
|
+
|
|
120
|
+
# http body (model)
|
|
121
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(posts_input)
|
|
122
|
+
|
|
123
|
+
# return_type
|
|
124
|
+
return_type = opts[:debug_return_type] || 'CreatePosts200Response'
|
|
125
|
+
|
|
126
|
+
# auth_names
|
|
127
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
128
|
+
|
|
129
|
+
new_options = opts.merge(
|
|
130
|
+
:operation => :"PostsApi.create_posts",
|
|
131
|
+
:header_params => header_params,
|
|
132
|
+
:query_params => query_params,
|
|
133
|
+
:form_params => form_params,
|
|
134
|
+
:body => post_body,
|
|
135
|
+
:auth_names => auth_names,
|
|
136
|
+
:return_type => return_type
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
140
|
+
if @api_client.config.debugging
|
|
141
|
+
@api_client.config.logger.debug "API called: PostsApi#create_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
142
|
+
end
|
|
143
|
+
return data, status_code, headers
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Publish a post to an external platform via an integration. Args: post_id: ID of the post to publish integration_id: ID of the integration to use (from postgen_integrations) Returns: Publication record with external_url and external_post_id
|
|
147
|
+
# @param company_id [String] Unique identifier for the Company
|
|
148
|
+
# @param post_id [String] Unique identifier for the Post
|
|
149
|
+
# @param integration_id [String] Unique identifier for the Integration
|
|
150
|
+
# @param posts_input [PostsInput]
|
|
151
|
+
# @param [Hash] opts the optional parameters
|
|
152
|
+
# @return [CreatePosts200Response]
|
|
153
|
+
def create_posts2(company_id, post_id, integration_id, posts_input, opts = {})
|
|
154
|
+
data, _status_code, _headers = create_posts2_with_http_info(company_id, post_id, integration_id, posts_input, opts)
|
|
155
|
+
data
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Publish a post to an external platform via an integration. Args: post_id: ID of the post to publish integration_id: ID of the integration to use (from postgen_integrations) Returns: Publication record with external_url and external_post_id
|
|
159
|
+
# @param company_id [String] Unique identifier for the Company
|
|
160
|
+
# @param post_id [String] Unique identifier for the Post
|
|
161
|
+
# @param integration_id [String] Unique identifier for the Integration
|
|
162
|
+
# @param posts_input [PostsInput]
|
|
163
|
+
# @param [Hash] opts the optional parameters
|
|
164
|
+
# @return [Array<(CreatePosts200Response, Integer, Hash)>] CreatePosts200Response data, response status code and response headers
|
|
165
|
+
def create_posts2_with_http_info(company_id, post_id, integration_id, posts_input, opts = {})
|
|
166
|
+
if @api_client.config.debugging
|
|
167
|
+
@api_client.config.logger.debug 'Calling API: PostsApi.create_posts2 ...'
|
|
168
|
+
end
|
|
169
|
+
# verify the required parameter 'company_id' is set
|
|
170
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
171
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling PostsApi.create_posts2"
|
|
172
|
+
end
|
|
173
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
174
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.create_posts2, the character length must be smaller than or equal to 255.'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
178
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.create_posts2, the character length must be greater than or equal to 1.'
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
182
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
183
|
+
fail ArgumentError, "invalid value for 'company_id' when calling PostsApi.create_posts2, must conform to the pattern #{pattern}."
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# verify the required parameter 'post_id' is set
|
|
187
|
+
if @api_client.config.client_side_validation && post_id.nil?
|
|
188
|
+
fail ArgumentError, "Missing the required parameter 'post_id' when calling PostsApi.create_posts2"
|
|
189
|
+
end
|
|
190
|
+
if @api_client.config.client_side_validation && post_id.to_s.length > 255
|
|
191
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.create_posts2, the character length must be smaller than or equal to 255.'
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if @api_client.config.client_side_validation && post_id.to_s.length < 1
|
|
195
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.create_posts2, the character length must be greater than or equal to 1.'
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
199
|
+
if @api_client.config.client_side_validation && post_id !~ pattern
|
|
200
|
+
fail ArgumentError, "invalid value for 'post_id' when calling PostsApi.create_posts2, must conform to the pattern #{pattern}."
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# verify the required parameter 'integration_id' is set
|
|
204
|
+
if @api_client.config.client_side_validation && integration_id.nil?
|
|
205
|
+
fail ArgumentError, "Missing the required parameter 'integration_id' when calling PostsApi.create_posts2"
|
|
206
|
+
end
|
|
207
|
+
if @api_client.config.client_side_validation && integration_id.to_s.length > 255
|
|
208
|
+
fail ArgumentError, 'invalid value for "integration_id" when calling PostsApi.create_posts2, the character length must be smaller than or equal to 255.'
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if @api_client.config.client_side_validation && integration_id.to_s.length < 1
|
|
212
|
+
fail ArgumentError, 'invalid value for "integration_id" when calling PostsApi.create_posts2, the character length must be greater than or equal to 1.'
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
216
|
+
if @api_client.config.client_side_validation && integration_id !~ pattern
|
|
217
|
+
fail ArgumentError, "invalid value for 'integration_id' when calling PostsApi.create_posts2, must conform to the pattern #{pattern}."
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# verify the required parameter 'posts_input' is set
|
|
221
|
+
if @api_client.config.client_side_validation && posts_input.nil?
|
|
222
|
+
fail ArgumentError, "Missing the required parameter 'posts_input' when calling PostsApi.create_posts2"
|
|
223
|
+
end
|
|
224
|
+
# resource path
|
|
225
|
+
local_var_path = '/companies/{company_id}/posts/{post_id}/publish/{integration_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s)).sub('{' + 'integration_id' + '}', CGI.escape(integration_id.to_s))
|
|
226
|
+
|
|
227
|
+
# query parameters
|
|
228
|
+
query_params = opts[:query_params] || {}
|
|
229
|
+
|
|
230
|
+
# header parameters
|
|
231
|
+
header_params = opts[:header_params] || {}
|
|
232
|
+
# HTTP header 'Accept' (if needed)
|
|
233
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
234
|
+
# HTTP header 'Content-Type'
|
|
235
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
236
|
+
if !content_type.nil?
|
|
237
|
+
header_params['Content-Type'] = content_type
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# form parameters
|
|
241
|
+
form_params = opts[:form_params] || {}
|
|
242
|
+
|
|
243
|
+
# http body (model)
|
|
244
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(posts_input)
|
|
245
|
+
|
|
246
|
+
# return_type
|
|
247
|
+
return_type = opts[:debug_return_type] || 'CreatePosts200Response'
|
|
248
|
+
|
|
249
|
+
# auth_names
|
|
250
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
251
|
+
|
|
252
|
+
new_options = opts.merge(
|
|
253
|
+
:operation => :"PostsApi.create_posts2",
|
|
254
|
+
:header_params => header_params,
|
|
255
|
+
:query_params => query_params,
|
|
256
|
+
:form_params => form_params,
|
|
257
|
+
:body => post_body,
|
|
258
|
+
:auth_names => auth_names,
|
|
259
|
+
:return_type => return_type
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
263
|
+
if @api_client.config.debugging
|
|
264
|
+
@api_client.config.logger.debug "API called: PostsApi#create_posts2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
265
|
+
end
|
|
266
|
+
return data, status_code, headers
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Publish a post (make it publicly visible).
|
|
270
|
+
# @param company_id [String] Unique identifier for the Company
|
|
271
|
+
# @param post_id [String] Unique identifier for the Post
|
|
272
|
+
# @param posts_input [PostsInput]
|
|
273
|
+
# @param [Hash] opts the optional parameters
|
|
274
|
+
# @return [CreatePosts200Response]
|
|
275
|
+
def create_posts_publish(company_id, post_id, posts_input, opts = {})
|
|
276
|
+
data, _status_code, _headers = create_posts_publish_with_http_info(company_id, post_id, posts_input, opts)
|
|
277
|
+
data
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Publish a post (make it publicly visible).
|
|
281
|
+
# @param company_id [String] Unique identifier for the Company
|
|
282
|
+
# @param post_id [String] Unique identifier for the Post
|
|
283
|
+
# @param posts_input [PostsInput]
|
|
284
|
+
# @param [Hash] opts the optional parameters
|
|
285
|
+
# @return [Array<(CreatePosts200Response, Integer, Hash)>] CreatePosts200Response data, response status code and response headers
|
|
286
|
+
def create_posts_publish_with_http_info(company_id, post_id, posts_input, opts = {})
|
|
287
|
+
if @api_client.config.debugging
|
|
288
|
+
@api_client.config.logger.debug 'Calling API: PostsApi.create_posts_publish ...'
|
|
289
|
+
end
|
|
290
|
+
# verify the required parameter 'company_id' is set
|
|
291
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
292
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling PostsApi.create_posts_publish"
|
|
293
|
+
end
|
|
294
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
295
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.create_posts_publish, the character length must be smaller than or equal to 255.'
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
299
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.create_posts_publish, the character length must be greater than or equal to 1.'
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
303
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
304
|
+
fail ArgumentError, "invalid value for 'company_id' when calling PostsApi.create_posts_publish, must conform to the pattern #{pattern}."
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# verify the required parameter 'post_id' is set
|
|
308
|
+
if @api_client.config.client_side_validation && post_id.nil?
|
|
309
|
+
fail ArgumentError, "Missing the required parameter 'post_id' when calling PostsApi.create_posts_publish"
|
|
310
|
+
end
|
|
311
|
+
if @api_client.config.client_side_validation && post_id.to_s.length > 255
|
|
312
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.create_posts_publish, the character length must be smaller than or equal to 255.'
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
if @api_client.config.client_side_validation && post_id.to_s.length < 1
|
|
316
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.create_posts_publish, the character length must be greater than or equal to 1.'
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
320
|
+
if @api_client.config.client_side_validation && post_id !~ pattern
|
|
321
|
+
fail ArgumentError, "invalid value for 'post_id' when calling PostsApi.create_posts_publish, must conform to the pattern #{pattern}."
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# verify the required parameter 'posts_input' is set
|
|
325
|
+
if @api_client.config.client_side_validation && posts_input.nil?
|
|
326
|
+
fail ArgumentError, "Missing the required parameter 'posts_input' when calling PostsApi.create_posts_publish"
|
|
327
|
+
end
|
|
328
|
+
# resource path
|
|
329
|
+
local_var_path = '/companies/{company_id}/posts/{post_id}/publish'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s))
|
|
330
|
+
|
|
331
|
+
# query parameters
|
|
332
|
+
query_params = opts[:query_params] || {}
|
|
333
|
+
|
|
334
|
+
# header parameters
|
|
335
|
+
header_params = opts[:header_params] || {}
|
|
336
|
+
# HTTP header 'Accept' (if needed)
|
|
337
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
338
|
+
# HTTP header 'Content-Type'
|
|
339
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
340
|
+
if !content_type.nil?
|
|
341
|
+
header_params['Content-Type'] = content_type
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# form parameters
|
|
345
|
+
form_params = opts[:form_params] || {}
|
|
346
|
+
|
|
347
|
+
# http body (model)
|
|
348
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(posts_input)
|
|
349
|
+
|
|
350
|
+
# return_type
|
|
351
|
+
return_type = opts[:debug_return_type] || 'CreatePosts200Response'
|
|
352
|
+
|
|
353
|
+
# auth_names
|
|
354
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
355
|
+
|
|
356
|
+
new_options = opts.merge(
|
|
357
|
+
:operation => :"PostsApi.create_posts_publish",
|
|
358
|
+
:header_params => header_params,
|
|
359
|
+
:query_params => query_params,
|
|
360
|
+
:form_params => form_params,
|
|
361
|
+
:body => post_body,
|
|
362
|
+
:auth_names => auth_names,
|
|
363
|
+
:return_type => return_type
|
|
364
|
+
)
|
|
365
|
+
|
|
366
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
367
|
+
if @api_client.config.debugging
|
|
368
|
+
@api_client.config.logger.debug "API called: PostsApi#create_posts_publish\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
369
|
+
end
|
|
370
|
+
return data, status_code, headers
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
# Unpublish a post (make it private/draft again).
|
|
374
|
+
# @param company_id [String] Unique identifier for the Company
|
|
375
|
+
# @param post_id [String] Unique identifier for the Post
|
|
376
|
+
# @param posts_input [PostsInput]
|
|
377
|
+
# @param [Hash] opts the optional parameters
|
|
378
|
+
# @return [CreatePosts200Response]
|
|
379
|
+
def create_posts_unpublish(company_id, post_id, posts_input, opts = {})
|
|
380
|
+
data, _status_code, _headers = create_posts_unpublish_with_http_info(company_id, post_id, posts_input, opts)
|
|
381
|
+
data
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
# Unpublish a post (make it private/draft again).
|
|
385
|
+
# @param company_id [String] Unique identifier for the Company
|
|
386
|
+
# @param post_id [String] Unique identifier for the Post
|
|
387
|
+
# @param posts_input [PostsInput]
|
|
388
|
+
# @param [Hash] opts the optional parameters
|
|
389
|
+
# @return [Array<(CreatePosts200Response, Integer, Hash)>] CreatePosts200Response data, response status code and response headers
|
|
390
|
+
def create_posts_unpublish_with_http_info(company_id, post_id, posts_input, opts = {})
|
|
391
|
+
if @api_client.config.debugging
|
|
392
|
+
@api_client.config.logger.debug 'Calling API: PostsApi.create_posts_unpublish ...'
|
|
393
|
+
end
|
|
394
|
+
# verify the required parameter 'company_id' is set
|
|
395
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
396
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling PostsApi.create_posts_unpublish"
|
|
397
|
+
end
|
|
398
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
399
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.create_posts_unpublish, the character length must be smaller than or equal to 255.'
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
403
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.create_posts_unpublish, the character length must be greater than or equal to 1.'
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
407
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
408
|
+
fail ArgumentError, "invalid value for 'company_id' when calling PostsApi.create_posts_unpublish, must conform to the pattern #{pattern}."
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# verify the required parameter 'post_id' is set
|
|
412
|
+
if @api_client.config.client_side_validation && post_id.nil?
|
|
413
|
+
fail ArgumentError, "Missing the required parameter 'post_id' when calling PostsApi.create_posts_unpublish"
|
|
414
|
+
end
|
|
415
|
+
if @api_client.config.client_side_validation && post_id.to_s.length > 255
|
|
416
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.create_posts_unpublish, the character length must be smaller than or equal to 255.'
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
if @api_client.config.client_side_validation && post_id.to_s.length < 1
|
|
420
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.create_posts_unpublish, the character length must be greater than or equal to 1.'
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
424
|
+
if @api_client.config.client_side_validation && post_id !~ pattern
|
|
425
|
+
fail ArgumentError, "invalid value for 'post_id' when calling PostsApi.create_posts_unpublish, must conform to the pattern #{pattern}."
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
# verify the required parameter 'posts_input' is set
|
|
429
|
+
if @api_client.config.client_side_validation && posts_input.nil?
|
|
430
|
+
fail ArgumentError, "Missing the required parameter 'posts_input' when calling PostsApi.create_posts_unpublish"
|
|
431
|
+
end
|
|
432
|
+
# resource path
|
|
433
|
+
local_var_path = '/companies/{company_id}/posts/{post_id}/unpublish'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s))
|
|
434
|
+
|
|
435
|
+
# query parameters
|
|
436
|
+
query_params = opts[:query_params] || {}
|
|
437
|
+
|
|
438
|
+
# header parameters
|
|
439
|
+
header_params = opts[:header_params] || {}
|
|
440
|
+
# HTTP header 'Accept' (if needed)
|
|
441
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
442
|
+
# HTTP header 'Content-Type'
|
|
443
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
444
|
+
if !content_type.nil?
|
|
445
|
+
header_params['Content-Type'] = content_type
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
# form parameters
|
|
449
|
+
form_params = opts[:form_params] || {}
|
|
450
|
+
|
|
451
|
+
# http body (model)
|
|
452
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(posts_input)
|
|
453
|
+
|
|
454
|
+
# return_type
|
|
455
|
+
return_type = opts[:debug_return_type] || 'CreatePosts200Response'
|
|
456
|
+
|
|
457
|
+
# auth_names
|
|
458
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
459
|
+
|
|
460
|
+
new_options = opts.merge(
|
|
461
|
+
:operation => :"PostsApi.create_posts_unpublish",
|
|
462
|
+
:header_params => header_params,
|
|
463
|
+
:query_params => query_params,
|
|
464
|
+
:form_params => form_params,
|
|
465
|
+
:body => post_body,
|
|
466
|
+
:auth_names => auth_names,
|
|
467
|
+
:return_type => return_type
|
|
468
|
+
)
|
|
469
|
+
|
|
470
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
471
|
+
if @api_client.config.debugging
|
|
472
|
+
@api_client.config.logger.debug "API called: PostsApi#create_posts_unpublish\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
473
|
+
end
|
|
474
|
+
return data, status_code, headers
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
# Increment view count for a post. Public endpoint (no authentication required).
|
|
478
|
+
# @param company_id [String] Unique identifier for the Company
|
|
479
|
+
# @param post_id [String] Unique identifier for the Post
|
|
480
|
+
# @param posts_input [PostsInput]
|
|
481
|
+
# @param [Hash] opts the optional parameters
|
|
482
|
+
# @return [CreatePosts200Response]
|
|
483
|
+
def create_posts_view(company_id, post_id, posts_input, opts = {})
|
|
484
|
+
data, _status_code, _headers = create_posts_view_with_http_info(company_id, post_id, posts_input, opts)
|
|
485
|
+
data
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
# Increment view count for a post. Public endpoint (no authentication required).
|
|
489
|
+
# @param company_id [String] Unique identifier for the Company
|
|
490
|
+
# @param post_id [String] Unique identifier for the Post
|
|
491
|
+
# @param posts_input [PostsInput]
|
|
492
|
+
# @param [Hash] opts the optional parameters
|
|
493
|
+
# @return [Array<(CreatePosts200Response, Integer, Hash)>] CreatePosts200Response data, response status code and response headers
|
|
494
|
+
def create_posts_view_with_http_info(company_id, post_id, posts_input, opts = {})
|
|
495
|
+
if @api_client.config.debugging
|
|
496
|
+
@api_client.config.logger.debug 'Calling API: PostsApi.create_posts_view ...'
|
|
497
|
+
end
|
|
498
|
+
# verify the required parameter 'company_id' is set
|
|
499
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
500
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling PostsApi.create_posts_view"
|
|
501
|
+
end
|
|
502
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
503
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.create_posts_view, the character length must be smaller than or equal to 255.'
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
507
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.create_posts_view, the character length must be greater than or equal to 1.'
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
511
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
512
|
+
fail ArgumentError, "invalid value for 'company_id' when calling PostsApi.create_posts_view, must conform to the pattern #{pattern}."
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
# verify the required parameter 'post_id' is set
|
|
516
|
+
if @api_client.config.client_side_validation && post_id.nil?
|
|
517
|
+
fail ArgumentError, "Missing the required parameter 'post_id' when calling PostsApi.create_posts_view"
|
|
518
|
+
end
|
|
519
|
+
if @api_client.config.client_side_validation && post_id.to_s.length > 255
|
|
520
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.create_posts_view, the character length must be smaller than or equal to 255.'
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
if @api_client.config.client_side_validation && post_id.to_s.length < 1
|
|
524
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.create_posts_view, the character length must be greater than or equal to 1.'
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
528
|
+
if @api_client.config.client_side_validation && post_id !~ pattern
|
|
529
|
+
fail ArgumentError, "invalid value for 'post_id' when calling PostsApi.create_posts_view, must conform to the pattern #{pattern}."
|
|
530
|
+
end
|
|
531
|
+
|
|
532
|
+
# verify the required parameter 'posts_input' is set
|
|
533
|
+
if @api_client.config.client_side_validation && posts_input.nil?
|
|
534
|
+
fail ArgumentError, "Missing the required parameter 'posts_input' when calling PostsApi.create_posts_view"
|
|
535
|
+
end
|
|
536
|
+
# resource path
|
|
537
|
+
local_var_path = '/companies/{company_id}/posts/{post_id}/view'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s))
|
|
538
|
+
|
|
539
|
+
# query parameters
|
|
540
|
+
query_params = opts[:query_params] || {}
|
|
541
|
+
|
|
542
|
+
# header parameters
|
|
543
|
+
header_params = opts[:header_params] || {}
|
|
544
|
+
# HTTP header 'Accept' (if needed)
|
|
545
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
546
|
+
# HTTP header 'Content-Type'
|
|
547
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
548
|
+
if !content_type.nil?
|
|
549
|
+
header_params['Content-Type'] = content_type
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
# form parameters
|
|
553
|
+
form_params = opts[:form_params] || {}
|
|
554
|
+
|
|
555
|
+
# http body (model)
|
|
556
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(posts_input)
|
|
557
|
+
|
|
558
|
+
# return_type
|
|
559
|
+
return_type = opts[:debug_return_type] || 'CreatePosts200Response'
|
|
560
|
+
|
|
561
|
+
# auth_names
|
|
562
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
563
|
+
|
|
564
|
+
new_options = opts.merge(
|
|
565
|
+
:operation => :"PostsApi.create_posts_view",
|
|
566
|
+
:header_params => header_params,
|
|
567
|
+
:query_params => query_params,
|
|
568
|
+
:form_params => form_params,
|
|
569
|
+
:body => post_body,
|
|
570
|
+
:auth_names => auth_names,
|
|
571
|
+
:return_type => return_type
|
|
572
|
+
)
|
|
573
|
+
|
|
574
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
575
|
+
if @api_client.config.debugging
|
|
576
|
+
@api_client.config.logger.debug "API called: PostsApi#create_posts_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
577
|
+
end
|
|
578
|
+
return data, status_code, headers
|
|
579
|
+
end
|
|
580
|
+
|
|
581
|
+
# Delete single post by ID.
|
|
582
|
+
# @param company_id [String] Unique identifier for the Company
|
|
583
|
+
# @param post_id [String] Unique identifier for the Post
|
|
584
|
+
# @param [Hash] opts the optional parameters
|
|
585
|
+
# @return [DeletePosts200Response]
|
|
586
|
+
def delete_posts(company_id, post_id, opts = {})
|
|
587
|
+
data, _status_code, _headers = delete_posts_with_http_info(company_id, post_id, opts)
|
|
588
|
+
data
|
|
589
|
+
end
|
|
590
|
+
|
|
591
|
+
# Delete single post by ID.
|
|
592
|
+
# @param company_id [String] Unique identifier for the Company
|
|
593
|
+
# @param post_id [String] Unique identifier for the Post
|
|
594
|
+
# @param [Hash] opts the optional parameters
|
|
595
|
+
# @return [Array<(DeletePosts200Response, Integer, Hash)>] DeletePosts200Response data, response status code and response headers
|
|
596
|
+
def delete_posts_with_http_info(company_id, post_id, opts = {})
|
|
597
|
+
if @api_client.config.debugging
|
|
598
|
+
@api_client.config.logger.debug 'Calling API: PostsApi.delete_posts ...'
|
|
599
|
+
end
|
|
600
|
+
# verify the required parameter 'company_id' is set
|
|
601
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
602
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling PostsApi.delete_posts"
|
|
603
|
+
end
|
|
604
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
605
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.delete_posts, the character length must be smaller than or equal to 255.'
|
|
606
|
+
end
|
|
607
|
+
|
|
608
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
609
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.delete_posts, the character length must be greater than or equal to 1.'
|
|
610
|
+
end
|
|
611
|
+
|
|
612
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
613
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
614
|
+
fail ArgumentError, "invalid value for 'company_id' when calling PostsApi.delete_posts, must conform to the pattern #{pattern}."
|
|
615
|
+
end
|
|
616
|
+
|
|
617
|
+
# verify the required parameter 'post_id' is set
|
|
618
|
+
if @api_client.config.client_side_validation && post_id.nil?
|
|
619
|
+
fail ArgumentError, "Missing the required parameter 'post_id' when calling PostsApi.delete_posts"
|
|
620
|
+
end
|
|
621
|
+
if @api_client.config.client_side_validation && post_id.to_s.length > 255
|
|
622
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.delete_posts, the character length must be smaller than or equal to 255.'
|
|
623
|
+
end
|
|
624
|
+
|
|
625
|
+
if @api_client.config.client_side_validation && post_id.to_s.length < 1
|
|
626
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.delete_posts, the character length must be greater than or equal to 1.'
|
|
627
|
+
end
|
|
628
|
+
|
|
629
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
630
|
+
if @api_client.config.client_side_validation && post_id !~ pattern
|
|
631
|
+
fail ArgumentError, "invalid value for 'post_id' when calling PostsApi.delete_posts, must conform to the pattern #{pattern}."
|
|
632
|
+
end
|
|
633
|
+
|
|
634
|
+
# resource path
|
|
635
|
+
local_var_path = '/companies/{company_id}/posts/{post_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s))
|
|
636
|
+
|
|
637
|
+
# query parameters
|
|
638
|
+
query_params = opts[:query_params] || {}
|
|
639
|
+
|
|
640
|
+
# header parameters
|
|
641
|
+
header_params = opts[:header_params] || {}
|
|
642
|
+
# HTTP header 'Accept' (if needed)
|
|
643
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
644
|
+
|
|
645
|
+
# form parameters
|
|
646
|
+
form_params = opts[:form_params] || {}
|
|
647
|
+
|
|
648
|
+
# http body (model)
|
|
649
|
+
post_body = opts[:debug_body]
|
|
650
|
+
|
|
651
|
+
# return_type
|
|
652
|
+
return_type = opts[:debug_return_type] || 'DeletePosts200Response'
|
|
653
|
+
|
|
654
|
+
# auth_names
|
|
655
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
656
|
+
|
|
657
|
+
new_options = opts.merge(
|
|
658
|
+
:operation => :"PostsApi.delete_posts",
|
|
659
|
+
:header_params => header_params,
|
|
660
|
+
:query_params => query_params,
|
|
661
|
+
:form_params => form_params,
|
|
662
|
+
:body => post_body,
|
|
663
|
+
:auth_names => auth_names,
|
|
664
|
+
:return_type => return_type
|
|
665
|
+
)
|
|
666
|
+
|
|
667
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
668
|
+
if @api_client.config.debugging
|
|
669
|
+
@api_client.config.logger.debug "API called: PostsApi#delete_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
670
|
+
end
|
|
671
|
+
return data, status_code, headers
|
|
672
|
+
end
|
|
673
|
+
|
|
674
|
+
# Get single post by ID.
|
|
675
|
+
# @param company_id [String] Unique identifier for the Company
|
|
676
|
+
# @param post_id [String] Unique identifier for the Post
|
|
677
|
+
# @param [Hash] opts the optional parameters
|
|
678
|
+
# @return [GetPostsById200Response]
|
|
679
|
+
def get_posts_by_id(company_id, post_id, opts = {})
|
|
680
|
+
data, _status_code, _headers = get_posts_by_id_with_http_info(company_id, post_id, opts)
|
|
681
|
+
data
|
|
682
|
+
end
|
|
683
|
+
|
|
684
|
+
# Get single post by ID.
|
|
685
|
+
# @param company_id [String] Unique identifier for the Company
|
|
686
|
+
# @param post_id [String] Unique identifier for the Post
|
|
687
|
+
# @param [Hash] opts the optional parameters
|
|
688
|
+
# @return [Array<(GetPostsById200Response, Integer, Hash)>] GetPostsById200Response data, response status code and response headers
|
|
689
|
+
def get_posts_by_id_with_http_info(company_id, post_id, opts = {})
|
|
690
|
+
if @api_client.config.debugging
|
|
691
|
+
@api_client.config.logger.debug 'Calling API: PostsApi.get_posts_by_id ...'
|
|
692
|
+
end
|
|
693
|
+
# verify the required parameter 'company_id' is set
|
|
694
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
695
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling PostsApi.get_posts_by_id"
|
|
696
|
+
end
|
|
697
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
698
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.get_posts_by_id, the character length must be smaller than or equal to 255.'
|
|
699
|
+
end
|
|
700
|
+
|
|
701
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
702
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.get_posts_by_id, the character length must be greater than or equal to 1.'
|
|
703
|
+
end
|
|
704
|
+
|
|
705
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
706
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
707
|
+
fail ArgumentError, "invalid value for 'company_id' when calling PostsApi.get_posts_by_id, must conform to the pattern #{pattern}."
|
|
708
|
+
end
|
|
709
|
+
|
|
710
|
+
# verify the required parameter 'post_id' is set
|
|
711
|
+
if @api_client.config.client_side_validation && post_id.nil?
|
|
712
|
+
fail ArgumentError, "Missing the required parameter 'post_id' when calling PostsApi.get_posts_by_id"
|
|
713
|
+
end
|
|
714
|
+
if @api_client.config.client_side_validation && post_id.to_s.length > 255
|
|
715
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.get_posts_by_id, the character length must be smaller than or equal to 255.'
|
|
716
|
+
end
|
|
717
|
+
|
|
718
|
+
if @api_client.config.client_side_validation && post_id.to_s.length < 1
|
|
719
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.get_posts_by_id, the character length must be greater than or equal to 1.'
|
|
720
|
+
end
|
|
721
|
+
|
|
722
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
723
|
+
if @api_client.config.client_side_validation && post_id !~ pattern
|
|
724
|
+
fail ArgumentError, "invalid value for 'post_id' when calling PostsApi.get_posts_by_id, must conform to the pattern #{pattern}."
|
|
725
|
+
end
|
|
726
|
+
|
|
727
|
+
# resource path
|
|
728
|
+
local_var_path = '/companies/{company_id}/posts/{post_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s))
|
|
729
|
+
|
|
730
|
+
# query parameters
|
|
731
|
+
query_params = opts[:query_params] || {}
|
|
732
|
+
|
|
733
|
+
# header parameters
|
|
734
|
+
header_params = opts[:header_params] || {}
|
|
735
|
+
# HTTP header 'Accept' (if needed)
|
|
736
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
737
|
+
|
|
738
|
+
# form parameters
|
|
739
|
+
form_params = opts[:form_params] || {}
|
|
740
|
+
|
|
741
|
+
# http body (model)
|
|
742
|
+
post_body = opts[:debug_body]
|
|
743
|
+
|
|
744
|
+
# return_type
|
|
745
|
+
return_type = opts[:debug_return_type] || 'GetPostsById200Response'
|
|
746
|
+
|
|
747
|
+
# auth_names
|
|
748
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
749
|
+
|
|
750
|
+
new_options = opts.merge(
|
|
751
|
+
:operation => :"PostsApi.get_posts_by_id",
|
|
752
|
+
:header_params => header_params,
|
|
753
|
+
:query_params => query_params,
|
|
754
|
+
:form_params => form_params,
|
|
755
|
+
:body => post_body,
|
|
756
|
+
:auth_names => auth_names,
|
|
757
|
+
:return_type => return_type
|
|
758
|
+
)
|
|
759
|
+
|
|
760
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
761
|
+
if @api_client.config.debugging
|
|
762
|
+
@api_client.config.logger.debug "API called: PostsApi#get_posts_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
763
|
+
end
|
|
764
|
+
return data, status_code, headers
|
|
765
|
+
end
|
|
766
|
+
|
|
767
|
+
# Get all publications for a post. Shows where this post has been published to external platforms. Returns: Array of publication records with platform, URL, status
|
|
768
|
+
# @param company_id [String] Unique identifier for the Company
|
|
769
|
+
# @param post_id [String] Unique identifier for the Post
|
|
770
|
+
# @param [Hash] opts the optional parameters
|
|
771
|
+
# @return [GetPostsById200Response]
|
|
772
|
+
def get_posts_by_id_publications(company_id, post_id, opts = {})
|
|
773
|
+
data, _status_code, _headers = get_posts_by_id_publications_with_http_info(company_id, post_id, opts)
|
|
774
|
+
data
|
|
775
|
+
end
|
|
776
|
+
|
|
777
|
+
# Get all publications for a post. Shows where this post has been published to external platforms. Returns: Array of publication records with platform, URL, status
|
|
778
|
+
# @param company_id [String] Unique identifier for the Company
|
|
779
|
+
# @param post_id [String] Unique identifier for the Post
|
|
780
|
+
# @param [Hash] opts the optional parameters
|
|
781
|
+
# @return [Array<(GetPostsById200Response, Integer, Hash)>] GetPostsById200Response data, response status code and response headers
|
|
782
|
+
def get_posts_by_id_publications_with_http_info(company_id, post_id, opts = {})
|
|
783
|
+
if @api_client.config.debugging
|
|
784
|
+
@api_client.config.logger.debug 'Calling API: PostsApi.get_posts_by_id_publications ...'
|
|
785
|
+
end
|
|
786
|
+
# verify the required parameter 'company_id' is set
|
|
787
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
788
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling PostsApi.get_posts_by_id_publications"
|
|
789
|
+
end
|
|
790
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
791
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.get_posts_by_id_publications, the character length must be smaller than or equal to 255.'
|
|
792
|
+
end
|
|
793
|
+
|
|
794
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
795
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.get_posts_by_id_publications, the character length must be greater than or equal to 1.'
|
|
796
|
+
end
|
|
797
|
+
|
|
798
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
799
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
800
|
+
fail ArgumentError, "invalid value for 'company_id' when calling PostsApi.get_posts_by_id_publications, must conform to the pattern #{pattern}."
|
|
801
|
+
end
|
|
802
|
+
|
|
803
|
+
# verify the required parameter 'post_id' is set
|
|
804
|
+
if @api_client.config.client_side_validation && post_id.nil?
|
|
805
|
+
fail ArgumentError, "Missing the required parameter 'post_id' when calling PostsApi.get_posts_by_id_publications"
|
|
806
|
+
end
|
|
807
|
+
if @api_client.config.client_side_validation && post_id.to_s.length > 255
|
|
808
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.get_posts_by_id_publications, the character length must be smaller than or equal to 255.'
|
|
809
|
+
end
|
|
810
|
+
|
|
811
|
+
if @api_client.config.client_side_validation && post_id.to_s.length < 1
|
|
812
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.get_posts_by_id_publications, the character length must be greater than or equal to 1.'
|
|
813
|
+
end
|
|
814
|
+
|
|
815
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
816
|
+
if @api_client.config.client_side_validation && post_id !~ pattern
|
|
817
|
+
fail ArgumentError, "invalid value for 'post_id' when calling PostsApi.get_posts_by_id_publications, must conform to the pattern #{pattern}."
|
|
818
|
+
end
|
|
819
|
+
|
|
820
|
+
# resource path
|
|
821
|
+
local_var_path = '/companies/{company_id}/posts/{post_id}/publications'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s))
|
|
822
|
+
|
|
823
|
+
# query parameters
|
|
824
|
+
query_params = opts[:query_params] || {}
|
|
825
|
+
|
|
826
|
+
# header parameters
|
|
827
|
+
header_params = opts[:header_params] || {}
|
|
828
|
+
# HTTP header 'Accept' (if needed)
|
|
829
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
830
|
+
|
|
831
|
+
# form parameters
|
|
832
|
+
form_params = opts[:form_params] || {}
|
|
833
|
+
|
|
834
|
+
# http body (model)
|
|
835
|
+
post_body = opts[:debug_body]
|
|
836
|
+
|
|
837
|
+
# return_type
|
|
838
|
+
return_type = opts[:debug_return_type] || 'GetPostsById200Response'
|
|
839
|
+
|
|
840
|
+
# auth_names
|
|
841
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
842
|
+
|
|
843
|
+
new_options = opts.merge(
|
|
844
|
+
:operation => :"PostsApi.get_posts_by_id_publications",
|
|
845
|
+
:header_params => header_params,
|
|
846
|
+
:query_params => query_params,
|
|
847
|
+
:form_params => form_params,
|
|
848
|
+
:body => post_body,
|
|
849
|
+
:auth_names => auth_names,
|
|
850
|
+
:return_type => return_type
|
|
851
|
+
)
|
|
852
|
+
|
|
853
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
854
|
+
if @api_client.config.debugging
|
|
855
|
+
@api_client.config.logger.debug "API called: PostsApi#get_posts_by_id_publications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
856
|
+
end
|
|
857
|
+
return data, status_code, headers
|
|
858
|
+
end
|
|
859
|
+
|
|
860
|
+
# Get a list of all posts for the user's company. Supports filtering, sorting, pagination.
|
|
861
|
+
# @param company_id [String] Unique identifier for the Company
|
|
862
|
+
# @param [Hash] opts the optional parameters
|
|
863
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
864
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
865
|
+
# @option opts [String] :sort_by Field to sort by
|
|
866
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
867
|
+
# @option opts [String] :search Search term to filter results
|
|
868
|
+
# @return [ListPosts200Response]
|
|
869
|
+
def list_posts(company_id, opts = {})
|
|
870
|
+
data, _status_code, _headers = list_posts_with_http_info(company_id, opts)
|
|
871
|
+
data
|
|
872
|
+
end
|
|
873
|
+
|
|
874
|
+
# Get a list of all posts for the user's company. Supports filtering, sorting, pagination.
|
|
875
|
+
# @param company_id [String] Unique identifier for the Company
|
|
876
|
+
# @param [Hash] opts the optional parameters
|
|
877
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
878
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
879
|
+
# @option opts [String] :sort_by Field to sort by
|
|
880
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
881
|
+
# @option opts [String] :search Search term to filter results
|
|
882
|
+
# @return [Array<(ListPosts200Response, Integer, Hash)>] ListPosts200Response data, response status code and response headers
|
|
883
|
+
def list_posts_with_http_info(company_id, opts = {})
|
|
884
|
+
if @api_client.config.debugging
|
|
885
|
+
@api_client.config.logger.debug 'Calling API: PostsApi.list_posts ...'
|
|
886
|
+
end
|
|
887
|
+
# verify the required parameter 'company_id' is set
|
|
888
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
889
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling PostsApi.list_posts"
|
|
890
|
+
end
|
|
891
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
892
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.list_posts, the character length must be smaller than or equal to 255.'
|
|
893
|
+
end
|
|
894
|
+
|
|
895
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
896
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.list_posts, the character length must be greater than or equal to 1.'
|
|
897
|
+
end
|
|
898
|
+
|
|
899
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
900
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
901
|
+
fail ArgumentError, "invalid value for 'company_id' when calling PostsApi.list_posts, must conform to the pattern #{pattern}."
|
|
902
|
+
end
|
|
903
|
+
|
|
904
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
905
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling PostsApi.list_posts, must be greater than or equal to 1.'
|
|
906
|
+
end
|
|
907
|
+
|
|
908
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
909
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PostsApi.list_posts, must be smaller than or equal to 100.'
|
|
910
|
+
end
|
|
911
|
+
|
|
912
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
913
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PostsApi.list_posts, must be greater than or equal to 1.'
|
|
914
|
+
end
|
|
915
|
+
|
|
916
|
+
allowable_values = ["asc", "desc"]
|
|
917
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
918
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
919
|
+
end
|
|
920
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
921
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling PostsApi.list_posts, the character length must be smaller than or equal to 255.'
|
|
922
|
+
end
|
|
923
|
+
|
|
924
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
925
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling PostsApi.list_posts, the character length must be greater than or equal to 1.'
|
|
926
|
+
end
|
|
927
|
+
|
|
928
|
+
# resource path
|
|
929
|
+
local_var_path = '/companies/{company_id}/posts'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
930
|
+
|
|
931
|
+
# query parameters
|
|
932
|
+
query_params = opts[:query_params] || {}
|
|
933
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
934
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
935
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
936
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
937
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
938
|
+
|
|
939
|
+
# header parameters
|
|
940
|
+
header_params = opts[:header_params] || {}
|
|
941
|
+
# HTTP header 'Accept' (if needed)
|
|
942
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
943
|
+
|
|
944
|
+
# form parameters
|
|
945
|
+
form_params = opts[:form_params] || {}
|
|
946
|
+
|
|
947
|
+
# http body (model)
|
|
948
|
+
post_body = opts[:debug_body]
|
|
949
|
+
|
|
950
|
+
# return_type
|
|
951
|
+
return_type = opts[:debug_return_type] || 'ListPosts200Response'
|
|
952
|
+
|
|
953
|
+
# auth_names
|
|
954
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
955
|
+
|
|
956
|
+
new_options = opts.merge(
|
|
957
|
+
:operation => :"PostsApi.list_posts",
|
|
958
|
+
:header_params => header_params,
|
|
959
|
+
:query_params => query_params,
|
|
960
|
+
:form_params => form_params,
|
|
961
|
+
:body => post_body,
|
|
962
|
+
:auth_names => auth_names,
|
|
963
|
+
:return_type => return_type
|
|
964
|
+
)
|
|
965
|
+
|
|
966
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
967
|
+
if @api_client.config.debugging
|
|
968
|
+
@api_client.config.logger.debug "API called: PostsApi#list_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
969
|
+
end
|
|
970
|
+
return data, status_code, headers
|
|
971
|
+
end
|
|
972
|
+
|
|
973
|
+
# GET /companies/{company_id}/posts/summary
|
|
974
|
+
# @param company_id [String] Unique identifier for the Company
|
|
975
|
+
# @param [Hash] opts the optional parameters
|
|
976
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
977
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
978
|
+
# @option opts [String] :sort_by Field to sort by
|
|
979
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
980
|
+
# @option opts [String] :search Search term to filter results
|
|
981
|
+
# @return [ListPosts200Response]
|
|
982
|
+
def list_posts_summary(company_id, opts = {})
|
|
983
|
+
data, _status_code, _headers = list_posts_summary_with_http_info(company_id, opts)
|
|
984
|
+
data
|
|
985
|
+
end
|
|
986
|
+
|
|
987
|
+
# GET /companies/{company_id}/posts/summary
|
|
988
|
+
# @param company_id [String] Unique identifier for the Company
|
|
989
|
+
# @param [Hash] opts the optional parameters
|
|
990
|
+
# @option opts [Integer] :page Page number for pagination (default to 1)
|
|
991
|
+
# @option opts [Integer] :limit Number of items per page (default to 20)
|
|
992
|
+
# @option opts [String] :sort_by Field to sort by
|
|
993
|
+
# @option opts [String] :sort_order Sort order (ascending or descending) (default to 'desc')
|
|
994
|
+
# @option opts [String] :search Search term to filter results
|
|
995
|
+
# @return [Array<(ListPosts200Response, Integer, Hash)>] ListPosts200Response data, response status code and response headers
|
|
996
|
+
def list_posts_summary_with_http_info(company_id, opts = {})
|
|
997
|
+
if @api_client.config.debugging
|
|
998
|
+
@api_client.config.logger.debug 'Calling API: PostsApi.list_posts_summary ...'
|
|
999
|
+
end
|
|
1000
|
+
# verify the required parameter 'company_id' is set
|
|
1001
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
1002
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling PostsApi.list_posts_summary"
|
|
1003
|
+
end
|
|
1004
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
1005
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.list_posts_summary, the character length must be smaller than or equal to 255.'
|
|
1006
|
+
end
|
|
1007
|
+
|
|
1008
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
1009
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.list_posts_summary, the character length must be greater than or equal to 1.'
|
|
1010
|
+
end
|
|
1011
|
+
|
|
1012
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
1013
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
1014
|
+
fail ArgumentError, "invalid value for 'company_id' when calling PostsApi.list_posts_summary, must conform to the pattern #{pattern}."
|
|
1015
|
+
end
|
|
1016
|
+
|
|
1017
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
1018
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling PostsApi.list_posts_summary, must be greater than or equal to 1.'
|
|
1019
|
+
end
|
|
1020
|
+
|
|
1021
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
1022
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PostsApi.list_posts_summary, must be smaller than or equal to 100.'
|
|
1023
|
+
end
|
|
1024
|
+
|
|
1025
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1026
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PostsApi.list_posts_summary, must be greater than or equal to 1.'
|
|
1027
|
+
end
|
|
1028
|
+
|
|
1029
|
+
allowable_values = ["asc", "desc"]
|
|
1030
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !allowable_values.include?(opts[:'sort_order'])
|
|
1031
|
+
fail ArgumentError, "invalid value for \"sort_order\", must be one of #{allowable_values}"
|
|
1032
|
+
end
|
|
1033
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 255
|
|
1034
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling PostsApi.list_posts_summary, the character length must be smaller than or equal to 255.'
|
|
1035
|
+
end
|
|
1036
|
+
|
|
1037
|
+
if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length < 1
|
|
1038
|
+
fail ArgumentError, 'invalid value for "opts[:"search"]" when calling PostsApi.list_posts_summary, the character length must be greater than or equal to 1.'
|
|
1039
|
+
end
|
|
1040
|
+
|
|
1041
|
+
# resource path
|
|
1042
|
+
local_var_path = '/companies/{company_id}/posts/summary'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
|
|
1043
|
+
|
|
1044
|
+
# query parameters
|
|
1045
|
+
query_params = opts[:query_params] || {}
|
|
1046
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1047
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1048
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
1049
|
+
query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
1050
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
1051
|
+
|
|
1052
|
+
# header parameters
|
|
1053
|
+
header_params = opts[:header_params] || {}
|
|
1054
|
+
# HTTP header 'Accept' (if needed)
|
|
1055
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1056
|
+
|
|
1057
|
+
# form parameters
|
|
1058
|
+
form_params = opts[:form_params] || {}
|
|
1059
|
+
|
|
1060
|
+
# http body (model)
|
|
1061
|
+
post_body = opts[:debug_body]
|
|
1062
|
+
|
|
1063
|
+
# return_type
|
|
1064
|
+
return_type = opts[:debug_return_type] || 'ListPosts200Response'
|
|
1065
|
+
|
|
1066
|
+
# auth_names
|
|
1067
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1068
|
+
|
|
1069
|
+
new_options = opts.merge(
|
|
1070
|
+
:operation => :"PostsApi.list_posts_summary",
|
|
1071
|
+
:header_params => header_params,
|
|
1072
|
+
:query_params => query_params,
|
|
1073
|
+
:form_params => form_params,
|
|
1074
|
+
:body => post_body,
|
|
1075
|
+
:auth_names => auth_names,
|
|
1076
|
+
:return_type => return_type
|
|
1077
|
+
)
|
|
1078
|
+
|
|
1079
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1080
|
+
if @api_client.config.debugging
|
|
1081
|
+
@api_client.config.logger.debug "API called: PostsApi#list_posts_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1082
|
+
end
|
|
1083
|
+
return data, status_code, headers
|
|
1084
|
+
end
|
|
1085
|
+
|
|
1086
|
+
# Update an existing post by ID. Note: last_edited_at is automatically updated.
|
|
1087
|
+
# @param company_id [String] Unique identifier for the Company
|
|
1088
|
+
# @param post_id [String] Unique identifier for the Post
|
|
1089
|
+
# @param posts_update [PostsUpdate]
|
|
1090
|
+
# @param [Hash] opts the optional parameters
|
|
1091
|
+
# @return [UpdatePosts200Response]
|
|
1092
|
+
def update_posts(company_id, post_id, posts_update, opts = {})
|
|
1093
|
+
data, _status_code, _headers = update_posts_with_http_info(company_id, post_id, posts_update, opts)
|
|
1094
|
+
data
|
|
1095
|
+
end
|
|
1096
|
+
|
|
1097
|
+
# Update an existing post by ID. Note: last_edited_at is automatically updated.
|
|
1098
|
+
# @param company_id [String] Unique identifier for the Company
|
|
1099
|
+
# @param post_id [String] Unique identifier for the Post
|
|
1100
|
+
# @param posts_update [PostsUpdate]
|
|
1101
|
+
# @param [Hash] opts the optional parameters
|
|
1102
|
+
# @return [Array<(UpdatePosts200Response, Integer, Hash)>] UpdatePosts200Response data, response status code and response headers
|
|
1103
|
+
def update_posts_with_http_info(company_id, post_id, posts_update, opts = {})
|
|
1104
|
+
if @api_client.config.debugging
|
|
1105
|
+
@api_client.config.logger.debug 'Calling API: PostsApi.update_posts ...'
|
|
1106
|
+
end
|
|
1107
|
+
# verify the required parameter 'company_id' is set
|
|
1108
|
+
if @api_client.config.client_side_validation && company_id.nil?
|
|
1109
|
+
fail ArgumentError, "Missing the required parameter 'company_id' when calling PostsApi.update_posts"
|
|
1110
|
+
end
|
|
1111
|
+
if @api_client.config.client_side_validation && company_id.to_s.length > 255
|
|
1112
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.update_posts, the character length must be smaller than or equal to 255.'
|
|
1113
|
+
end
|
|
1114
|
+
|
|
1115
|
+
if @api_client.config.client_side_validation && company_id.to_s.length < 1
|
|
1116
|
+
fail ArgumentError, 'invalid value for "company_id" when calling PostsApi.update_posts, the character length must be greater than or equal to 1.'
|
|
1117
|
+
end
|
|
1118
|
+
|
|
1119
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
1120
|
+
if @api_client.config.client_side_validation && company_id !~ pattern
|
|
1121
|
+
fail ArgumentError, "invalid value for 'company_id' when calling PostsApi.update_posts, must conform to the pattern #{pattern}."
|
|
1122
|
+
end
|
|
1123
|
+
|
|
1124
|
+
# verify the required parameter 'post_id' is set
|
|
1125
|
+
if @api_client.config.client_side_validation && post_id.nil?
|
|
1126
|
+
fail ArgumentError, "Missing the required parameter 'post_id' when calling PostsApi.update_posts"
|
|
1127
|
+
end
|
|
1128
|
+
if @api_client.config.client_side_validation && post_id.to_s.length > 255
|
|
1129
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.update_posts, the character length must be smaller than or equal to 255.'
|
|
1130
|
+
end
|
|
1131
|
+
|
|
1132
|
+
if @api_client.config.client_side_validation && post_id.to_s.length < 1
|
|
1133
|
+
fail ArgumentError, 'invalid value for "post_id" when calling PostsApi.update_posts, the character length must be greater than or equal to 1.'
|
|
1134
|
+
end
|
|
1135
|
+
|
|
1136
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
|
|
1137
|
+
if @api_client.config.client_side_validation && post_id !~ pattern
|
|
1138
|
+
fail ArgumentError, "invalid value for 'post_id' when calling PostsApi.update_posts, must conform to the pattern #{pattern}."
|
|
1139
|
+
end
|
|
1140
|
+
|
|
1141
|
+
# verify the required parameter 'posts_update' is set
|
|
1142
|
+
if @api_client.config.client_side_validation && posts_update.nil?
|
|
1143
|
+
fail ArgumentError, "Missing the required parameter 'posts_update' when calling PostsApi.update_posts"
|
|
1144
|
+
end
|
|
1145
|
+
# resource path
|
|
1146
|
+
local_var_path = '/companies/{company_id}/posts/{post_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'post_id' + '}', CGI.escape(post_id.to_s))
|
|
1147
|
+
|
|
1148
|
+
# query parameters
|
|
1149
|
+
query_params = opts[:query_params] || {}
|
|
1150
|
+
|
|
1151
|
+
# header parameters
|
|
1152
|
+
header_params = opts[:header_params] || {}
|
|
1153
|
+
# HTTP header 'Accept' (if needed)
|
|
1154
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1155
|
+
# HTTP header 'Content-Type'
|
|
1156
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1157
|
+
if !content_type.nil?
|
|
1158
|
+
header_params['Content-Type'] = content_type
|
|
1159
|
+
end
|
|
1160
|
+
|
|
1161
|
+
# form parameters
|
|
1162
|
+
form_params = opts[:form_params] || {}
|
|
1163
|
+
|
|
1164
|
+
# http body (model)
|
|
1165
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(posts_update)
|
|
1166
|
+
|
|
1167
|
+
# return_type
|
|
1168
|
+
return_type = opts[:debug_return_type] || 'UpdatePosts200Response'
|
|
1169
|
+
|
|
1170
|
+
# auth_names
|
|
1171
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1172
|
+
|
|
1173
|
+
new_options = opts.merge(
|
|
1174
|
+
:operation => :"PostsApi.update_posts",
|
|
1175
|
+
:header_params => header_params,
|
|
1176
|
+
:query_params => query_params,
|
|
1177
|
+
:form_params => form_params,
|
|
1178
|
+
:body => post_body,
|
|
1179
|
+
:auth_names => auth_names,
|
|
1180
|
+
:return_type => return_type
|
|
1181
|
+
)
|
|
1182
|
+
|
|
1183
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
1184
|
+
if @api_client.config.debugging
|
|
1185
|
+
@api_client.config.logger.debug "API called: PostsApi#update_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1186
|
+
end
|
|
1187
|
+
return data, status_code, headers
|
|
1188
|
+
end
|
|
1189
|
+
end
|
|
1190
|
+
end
|