Module: Hubspot::Discovery::BaseApiClient
- Included in:
- Automation::Actions::CallbacksApi, Automation::Actions::DefinitionsApi, Automation::Actions::FunctionsApi, Automation::Actions::RevisionsApi, Cms::AuditLogs::AuditLogsApi, Cms::Blogs::Authors::BlogAuthorsApi, Cms::Blogs::BlogPosts::BlogPostsApi, Cms::Blogs::Tags::BlogTagsApi, Cms::Domains::DomainsApi, Cms::Hubdb::RowsApi, Cms::Hubdb::RowsBatchApi, Cms::Hubdb::TablesApi, Cms::Pages::LandingPagesApi, Cms::Pages::SitePagesApi, Cms::Performance::PublicPerformanceApi, Cms::SiteSearch::PublicApi, Cms::SourceCode::ContentApi, Cms::SourceCode::ExtractApi, Cms::SourceCode::MetadataApi, Cms::SourceCode::SourceCodeExtractApi, Cms::SourceCode::ValidationApi, Cms::UrlRedirects::RedirectsApi, CommunicationPreferences::DefinitionApi, CommunicationPreferences::StatusApi, Conversations::VisitorIdentification::GenerateApi, Crm::Associations::BatchApi, Crm::Associations::Schema::TypesApi, Crm::Associations::V4::BasicApi, Crm::Associations::V4::BatchApi, Crm::Associations::V4::Schema::DefinitionsApi, Crm::Companies::BasicApi, Crm::Companies::BatchApi, Crm::Companies::PublicObjectApi, Crm::Companies::SearchApi, Crm::Contacts::BasicApi, Crm::Contacts::BatchApi, Crm::Contacts::GDPRApi, Crm::Contacts::PublicObjectApi, Crm::Contacts::SearchApi, Crm::Deals::BasicApi, Crm::Deals::BatchApi, Crm::Deals::PublicObjectApi, Crm::Deals::SearchApi, Crm::Extensions::Accounting::CallbacksApi, Crm::Extensions::Accounting::InvoiceApi, Crm::Extensions::Accounting::SettingsApi, Crm::Extensions::Accounting::SyncApi, Crm::Extensions::Accounting::UserAccountsApi, Crm::Extensions::Calling::RecordingSettingsApi, Crm::Extensions::Calling::SettingsApi, Crm::Extensions::Cards::CardsApi, Crm::Extensions::Cards::SampleResponseApi, Crm::Extensions::Videoconferencing::SettingsApi, Crm::Imports::CoreApi, Crm::Imports::PublicImportsApi, Crm::LineItems::BasicApi, Crm::LineItems::BatchApi, Crm::LineItems::GDPRApi, Crm::LineItems::PublicObjectApi, Crm::LineItems::SearchApi, Crm::Lists::ListsApi, Crm::Lists::MembershipsApi, Crm::Objects::AssociationsApi, Crm::Objects::BasicApi, Crm::Objects::BatchApi, Crm::Objects::Calls::BasicApi, Crm::Objects::Calls::BatchApi, Crm::Objects::Calls::GDPRApi, Crm::Objects::Calls::PublicObjectApi, Crm::Objects::Calls::SearchApi, Crm::Objects::Communications::BasicApi, Crm::Objects::Communications::BatchApi, Crm::Objects::Communications::GDPRApi, Crm::Objects::Communications::PublicObjectApi, Crm::Objects::Communications::SearchApi, Crm::Objects::Emails::BasicApi, Crm::Objects::Emails::BatchApi, Crm::Objects::Emails::GDPRApi, Crm::Objects::Emails::PublicObjectApi, Crm::Objects::Emails::SearchApi, Crm::Objects::FeedbackSubmissions::BasicApi, Crm::Objects::FeedbackSubmissions::BatchApi, Crm::Objects::FeedbackSubmissions::GDPRApi, Crm::Objects::FeedbackSubmissions::PublicObjectApi, Crm::Objects::FeedbackSubmissions::SearchApi, Crm::Objects::GDPRApi, Crm::Objects::Goals::BasicApi, Crm::Objects::Goals::BatchApi, Crm::Objects::Goals::GDPRApi, Crm::Objects::Goals::PublicObjectApi, Crm::Objects::Goals::SearchApi, Crm::Objects::Meetings::BasicApi, Crm::Objects::Meetings::BatchApi, Crm::Objects::Meetings::GDPRApi, Crm::Objects::Meetings::PublicObjectApi, Crm::Objects::Meetings::SearchApi, Crm::Objects::Notes::BasicApi, Crm::Objects::Notes::BatchApi, Crm::Objects::Notes::GDPRApi, Crm::Objects::Notes::PublicObjectApi, Crm::Objects::Notes::SearchApi, Crm::Objects::PostalMail::BasicApi, Crm::Objects::PostalMail::BatchApi, Crm::Objects::PostalMail::GDPRApi, Crm::Objects::PostalMail::PublicObjectApi, Crm::Objects::PostalMail::SearchApi, Crm::Objects::PublicObjectApi, Crm::Objects::SearchApi, Crm::Objects::Tasks::BasicApi, Crm::Objects::Tasks::BatchApi, Crm::Objects::Tasks::GDPRApi, Crm::Objects::Tasks::PublicObjectApi, Crm::Objects::Tasks::SearchApi, Crm::Objects::Taxes::BasicApi, Crm::Objects::Taxes::BatchApi, Crm::Objects::Taxes::GDPRApi, Crm::Objects::Taxes::PublicObjectApi, Crm::Objects::Taxes::SearchApi, Crm::Owners::OwnersApi, Crm::Pipelines::PipelineAuditsApi, Crm::Pipelines::PipelineStageAuditsApi, Crm::Pipelines::PipelineStagesApi, Crm::Pipelines::PipelinesApi, Crm::Products::AssociationsApi, Crm::Products::BasicApi, Crm::Products::BatchApi, Crm::Products::GDPRApi, Crm::Products::PublicObjectApi, Crm::Products::SearchApi, Crm::Properties::BatchApi, Crm::Properties::CoreApi, Crm::Properties::GroupsApi, Crm::Quotes::AssociationsApi, Crm::Quotes::BasicApi, Crm::Quotes::BatchApi, Crm::Quotes::GDPRApi, Crm::Quotes::PublicObjectApi, Crm::Quotes::SearchApi, Crm::Schemas::CoreApi, Crm::Schemas::PublicObjectSchemasApi, Crm::Tickets::AssociationsApi, Crm::Tickets::BasicApi, Crm::Tickets::BatchApi, Crm::Tickets::GDPRApi, Crm::Tickets::PublicObjectApi, Crm::Tickets::SearchApi, Crm::Timeline::EventsApi, Crm::Timeline::TemplatesApi, Crm::Timeline::TokensApi, Events::EventsApi, Events::Send::CustomEventDataApi, Files::FilesApi, Files::FoldersApi, Marketing::Events::AttendanceSubscriberStateChangesApi, Marketing::Events::BasicApi, Marketing::Events::BatchApi, Marketing::Events::MarketingEventsExternalApi, Marketing::Events::SearchApi, Marketing::Events::SettingsApi, Marketing::Events::SubscriberStateChangesApi, Marketing::Forms::FormsApi, Marketing::Transactional::PublicSmtpTokensApi, Marketing::Transactional::SingleSendApi, OAuth::AccessTokensApi, OAuth::RefreshTokensApi, OAuth::TokensApi, Settings::BusinessUnits::BusinessUnitApi, Settings::Users::RolesApi, Settings::Users::TeamsApi, Settings::Users::UsersApi, Webhooks::SettingsApi, Webhooks::SubscriptionsApi
- Defined in:
- lib/hubspot/discovery/base_api_client.rb
Instance Attribute Summary collapse
-
#base_params ⇒ Object
readonly
Returns the value of attribute base_params.
Class Method Summary collapse
Instance Method Summary collapse
- #api ⇒ Object
- #api_client ⇒ Object
- #api_methods ⇒ Object
- #config ⇒ Object
- #get_all(params = {}) ⇒ Object
- #initialize(params) ⇒ Object
Instance Attribute Details
#base_params ⇒ Object (readonly)
Returns the value of attribute base_params.
7 8 9 |
# File 'lib/hubspot/discovery/base_api_client.rb', line 7 def base_params @base_params end |
Class Method Details
.const_get(const) ⇒ Object
58 59 60 61 62 63 64 65 66 |
# File 'lib/hubspot/discovery/base_api_client.rb', line 58 def (Kernel.const_get(codegen_module_name)).const_get(const) require 'hubspot/helpers/path' codegen_module_path = Hubspot::Helpers::Path.new.format(self.name).gsub('hubspot/', 'hubspot/codegen/') codegen_model = Hubspot::Helpers::Path.new.format(const) Hubspot::Helpers::Path.new.require_with_codegen_mapping("#{codegen_module_path}/models/#{codegen_model}") super rescue LoadError super end |
Instance Method Details
#api ⇒ Object
31 32 33 34 35 36 |
# File 'lib/hubspot/discovery/base_api_client.rb', line 31 def api class_name = codegen_api_path.gsub(/(.*)\/(.*)/, '\2') require_codegen codegen_api_path.gsub(class_name, "api/#{class_name}") require_api_models @api ||= Kernel.const_get(codegen_api_class).new(api_client) end |
#api_client ⇒ Object
25 26 27 28 29 |
# File 'lib/hubspot/discovery/base_api_client.rb', line 25 def api_client require_codegen "#{codegen_module_path}/api_client" require_api_error @api_client ||= Kernel.const_get( "#{codegen_module_name}::ApiClient").new(config) end |
#api_methods ⇒ Object
14 15 16 17 18 19 |
# File 'lib/hubspot/discovery/base_api_client.rb', line 14 def api_methods api.methods.grep(/with_http_info/).inject([]) do |methods, method| methods << method methods << method.to_s.gsub('_with_http_info', '').to_sym end end |
#config ⇒ Object
21 22 23 |
# File 'lib/hubspot/discovery/base_api_client.rb', line 21 def config @config ||= new_config end |
#get_all(params = {}) ⇒ Object
38 39 40 |
# File 'lib/hubspot/discovery/base_api_client.rb', line 38 def get_all(params = {}) api.get_all(params) end |
#initialize(params) ⇒ Object
9 10 11 12 |
# File 'lib/hubspot/discovery/base_api_client.rb', line 9 def initialize(params) @base_params = params define_methods end |