Module: Files
- Defined in:
- lib/files.com.rb,
lib/files.com/api.rb,
lib/files.com/uri.rb,
lib/files.com/list.rb,
lib/files.com/util.rb,
lib/files.com/errors.rb,
lib/files.com/version.rb,
lib/files.com/response.rb,
lib/files.com/path_util.rb,
lib/files.com/api_client.rb,
lib/files.com/models/app.rb,
lib/files.com/models/dir.rb,
lib/files.com/sizable_io.rb,
lib/files.com/models/auto.rb,
lib/files.com/models/file.rb,
lib/files.com/models/lock.rb,
lib/files.com/models/site.rb,
lib/files.com/models/user.rb,
lib/files.com/models/group.rb,
lib/files.com/models/image.rb,
lib/files.com/models/style.rb,
lib/files.com/models/action.rb,
lib/files.com/models/bundle.rb,
lib/files.com/models/errors.rb,
lib/files.com/models/folder.rb,
lib/files.com/models/status.rb,
lib/files.com/models/api_key.rb,
lib/files.com/models/gpg_key.rb,
lib/files.com/models/history.rb,
lib/files.com/models/invoice.rb,
lib/files.com/models/message.rb,
lib/files.com/models/payment.rb,
lib/files.com/models/preview.rb,
lib/files.com/models/project.rb,
lib/files.com/models/request.rb,
lib/files.com/models/session.rb,
lib/files.com/models/behavior.rb,
lib/files.com/models/priority.rb,
lib/files.com/models/snapshot.rb,
lib/files.com/models/sync_log.rb,
lib/files.com/system_profiler.rb,
lib/files.com/models/clickwrap.rb,
lib/files.com/models/email_log.rb,
lib/files.com/models/automation.rb,
lib/files.com/models/dns_record.rb,
lib/files.com/models/file_utils.rb,
lib/files.com/models/form_field.rb,
lib/files.com/models/group_user.rb,
lib/files.com/models/ip_address.rb,
lib/files.com/models/permission.rb,
lib/files.com/models/public_key.rb,
lib/files.com/models/as2_partner.rb,
lib/files.com/models/as2_station.rb,
lib/files.com/models/bundle_path.rb,
lib/files.com/models/file_action.rb,
lib/files.com/models/share_group.rb,
lib/files.com/models/file_comment.rb,
lib/files.com/models/inbox_upload.rb,
lib/files.com/models/notification.rb,
lib/files.com/models/sso_strategy.rb,
lib/files.com/models/user_request.rb,
lib/files.com/models/webhook_test.rb,
lib/files.com/models/bundle_action.rb,
lib/files.com/models/remote_server.rb,
lib/files.com/models/sftp_host_key.rb,
lib/files.com/models/automation_log.rb,
lib/files.com/models/automation_run.rb,
lib/files.com/models/external_event.rb,
lib/files.com/models/file_migration.rb,
lib/files.com/models/form_field_set.rb,
lib/files.com/models/ftp_action_log.rb,
lib/files.com/models/history_export.rb,
lib/files.com/models/usage_snapshot.rb,
lib/files.com/models/api_request_log.rb,
lib/files.com/models/bundle_download.rb,
lib/files.com/models/inbox_recipient.rb,
lib/files.com/models/message_comment.rb,
lib/files.com/models/settings_change.rb,
lib/files.com/models/sftp_action_log.rb,
lib/files.com/models/user_cipher_use.rb,
lib/files.com/models/bundle_recipient.rb,
lib/files.com/models/file_upload_part.rb,
lib/files.com/models/message_reaction.rb,
lib/files.com/models/account_line_item.rb,
lib/files.com/models/invoice_line_item.rb,
lib/files.com/models/payment_line_item.rb,
lib/files.com/models/public_ip_address.rb,
lib/files.com/models/bandwidth_snapshot.rb,
lib/files.com/models/file_migration_log.rb,
lib/files.com/models/inbox_registration.rb,
lib/files.com/models/share_group_member.rb,
lib/files.com/models/web_dav_action_log.rb,
lib/files.com/models/bundle_notification.rb,
lib/files.com/models/bundle_registration.rb,
lib/files.com/models/as2_incoming_message.rb,
lib/files.com/models/as2_outgoing_message.rb,
lib/files.com/models/usage_daily_snapshot.rb,
lib/files.com/models/user_sftp_client_use.rb,
lib/files.com/models/file_comment_reaction.rb,
lib/files.com/models/history_export_result.rb,
lib/files.com/models/siem_http_destination.rb,
lib/files.com/models/email_incoming_message.rb,
lib/files.com/models/outbound_connection_log.rb,
lib/files.com/models/exavault_api_request_log.rb,
lib/files.com/models/message_comment_reaction.rb,
lib/files.com/models/remote_bandwidth_snapshot.rb,
lib/files.com/models/action_notification_export.rb,
lib/files.com/models/public_hosting_request_log.rb,
lib/files.com/models/remote_server_configuration_file.rb,
lib/files.com/models/action_notification_export_result.rb
Defined Under Namespace
Modules: PathUtil, URI, Util Classes: APIConnectionError, APIError, AccountAlreadyExistsError, AccountLineItem, AccountOverdueError, Action, ActionNotificationExport, ActionNotificationExportResult, AdditionalAuthenticationRequiredError, AgentUnavailableError, AgentUpgradeRequiredError, AlreadyCompletedError, Api, ApiClient, ApiKey, ApiKeyIsDisabledError, ApiKeyIsPathRestrictedError, ApiKeyNotFoundError, ApiKeyOnlyForDesktopAppError, ApiKeyOnlyForMobileAppError, ApiKeyOnlyForOfficeIntegrationError, ApiRequestLog, App, As2IncomingMessage, As2OutgoingMessage, As2Partner, As2Station, AttachmentTooLargeError, AuthenticationError, AuthenticationRequiredError, Auto, Automation, AutomationCannotBeRunManuallyError, AutomationLog, AutomationRun, AutomationsUnavailableError, BadRequestError, BandwidthSnapshot, Behavior, BehaviorNotAllowedOnRemoteServerError, BillingOrSiteAdminPermissionRequiredError, BillingPermissionRequiredError, Bundle, BundleAction, BundleDownload, BundleMaximumUsesReachedError, BundleNotification, BundleOnlyAllowsPreviewsError, BundleOperationRequiresSubfolderError, BundlePath, BundlePathNotFoundError, BundleRecipient, BundleRegistration, BundleRegistrationCodeFailedError, BundleRegistrationNotFoundError, CannotDownloadDirectoryError, CannotLoginWhileUsingKeyError, CantActForOtherUserError, CantMoveWithMultipleLocationsError, Clickwrap, CodeNotFoundError, ContactAdminForPasswordChangeHelpError, CouldNotCreateParentError, DatetimeParseError, DestinationExistsError, DestinationFolderLimitedError, DestinationParentConflictError, DestinationParentDoesNotExistError, DestinationSameError, DnsRecord, DuplicateShareRecipientError, EmailIncomingMessage, EmailLog, Error, Errors, ExavaultApiRequestLog, ExpiredPrivateKeyError, ExpiredPublicKeyError, ExportFailureError, ExportNotReadyError, ExternalEvent, FailedToChangePasswordError, File, FileAction, FileComment, FileCommentReaction, FileLockedError, FileMigration, FileMigrationLog, FileNotFoundError, FileNotUploadedError, FilePendingProcessingError, FileProcessingErrorError, FileTooBigToDecryptError, FileTooBigToEncryptError, FileUploadNotFoundError, FileUploadPart, FileUploadedToWrongRegionError, FileUtils, FilenameTooLongError, FilesAgentFailedAuthorizationError, FilesAgentTokenFailedError, Folder, FolderAdminOrBillingPermissionRequiredError, FolderAdminPermissionRequiredError, FolderLockedError, FolderMustNotBeAFileError, FolderNotEmptyError, FolderNotFoundError, FormField, FormFieldSet, FtpActionLog, FullPermissionRequiredError, GpgKey, Group, GroupNotFoundError, GroupUser, History, HistoryExport, HistoryExportResult, HistoryPermissionRequiredError, HistoryUnavailableError, Image, InboxNotFoundError, InboxRecipient, InboxRegistration, InboxRegistrationCodeFailedError, InboxUpload, InsufficientPermissionForParamsError, InsufficientPermissionForSiteError, InvalidBodyError, InvalidBundleCodeError, InvalidCredentialsError, InvalidCursorError, InvalidCursorTypeForSortError, InvalidEtagsError, InvalidFileTypeError, InvalidFilenameError, InvalidFilterAliasCombinationError, InvalidFilterFieldError, InvalidFilterParamError, InvalidFilterParamValueError, InvalidInputEncodingError, InvalidInterfaceError, InvalidOauthError, InvalidOauthProviderError, InvalidOrExpiredCodeError, InvalidParameterError, InvalidPathError, InvalidPriorityColorError, InvalidRangeError, InvalidReturnToUrlError, InvalidSessionError, InvalidSortFilterCombinationError, InvalidUploadOffsetError, InvalidUploadPartGapError, InvalidUploadPartSizeError, InvalidUsernameOrPasswordError, Invoice, InvoiceLineItem, IpAddress, List, Lock, LockedOutError, LockoutRegionMismatchError, Message, MessageComment, MessageCommentReaction, MessageReaction, MethodNotAllowedError, MigrationInProgressError, MissingParameterError, ModelSaveErrorError, MultipleProcessingErrorsError, MustAuthenticateWithApiKeyError, NeedAdminPermissionForInboxError, NestedNotFoundError, NoAccountForSiteError, NoValidInputParamsError, NonAdminsMustQueryByFolderOrPathError, NotAllowedToCreateBundleError, NotAuthenticatedError, NotAuthorizedError, NotFoundError, NotImplementedError, Notification, OneTimePasswordIncorrectError, OutboundConnectionLog, PartNumberTooLargeError, PasswordChangeNotRequiredError, PasswordChangeRequiredError, PathCannotHaveTrailingWhitespaceError, PathTooLongError, Payment, PaymentLineItem, Permission, PlanNotFoundError, Preview, Priority, ProcessingFailureError, Project, PublicHostingRequestLog, PublicIpAddress, PublicKey, RateLimitedError, ReadOnlySessionError, ReadPermissionRequiredError, ReauthenticationFailedError, ReauthenticationFailedFinalError, ReauthenticationNeededActionError, ReauthenticationNeededFieldsError, ReauthenticationRateLimitedError, RecaptchaFailedError, RecipientAlreadySharedError, RemoteBandwidthSnapshot, RemoteServer, RemoteServerConfigurationFile, RemoteServerErrorError, Request, RequestParamsContainInvalidCharacterError, RequestParamsInvalidError, RequestParamsRequiredError, ResourceLockedError, Response, SearchAllOnChildPathError, SelfManagedRequiredError, ServiceUnavailableError, Session, SettingsChange, SftpActionLog, SftpHostKey, ShareGroup, ShareGroupMember, SiemHttpDestination, Site, SiteAdminRequiredError, SiteConfigurationError, SiteDisabledError, SiteFilesAreImmutableError, SiteNotFoundError, SiteWasRemovedError, SizableIO, Snapshot, SsoStrategy, Status, Style, SubfolderLockedError, SyncLog, SystemProfiler, TooManyConcurrentLoginsError, TooManyConcurrentRequestsError, TooManyLoginAttemptsError, TooManyRequestsError, TooManySharesError, TrialExpiredError, TrialLockedError, TwoFactorAuthenticationCodeAlreadySentError, TwoFactorAuthenticationCountryBlacklistedError, TwoFactorAuthenticationErrorError, TwoFactorAuthenticationGeneralErrorError, TwoFactorAuthenticationMethodUnsupportedErrorError, TwoFactorAuthenticationRequiredError, TwoFactorAuthenticationSetupExpiredError, TwoFactorAuthenticationUnsubscribedRecipientError, UnsupportedCurrencyError, UnsupportedHttpResponseFormatError, UnsupportedMediaTypeError, UpdatesNotAllowedForRemotesError, UploadsUnavailableError, UsageDailySnapshot, UsageSnapshot, User, UserCipherUse, UserIdInvalidError, UserIdOnUserEndpointError, UserIdWithoutSiteAdminError, UserNotFoundError, UserRequest, UserRequestsEnabledRequiredError, UserRequiredError, UserSftpClientUse, WebDavActionLog, WebhookTest, WriteAndBundlePermissionRequiredError, WritePermissionRequiredError, ZipDownloadIpMismatchError
Constant Summary collapse
- LEVEL_DEBUG =
map to the same values as the standard library’s logger
Logger::DEBUG
- LEVEL_ERROR =
Logger::ERROR
- LEVEL_INFO =
Logger::INFO
- VERSION =
"1.1.156"
- Dir =
Folder
Class Attribute Summary collapse
-
.api_key ⇒ Object
Returns the value of attribute api_key.
-
.base_url ⇒ Object
Returns the value of attribute base_url.
-
.default_headers ⇒ Object
Returns the value of attribute default_headers.
-
.initial_network_retry_delay ⇒ Object
Returns the value of attribute initial_network_retry_delay.
-
.max_network_retry_delay ⇒ Object
Returns the value of attribute max_network_retry_delay.
-
.open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
.proxy ⇒ Object
Returns the value of attribute proxy.
-
.read_timeout ⇒ Object
Returns the value of attribute read_timeout.
-
.session_id ⇒ Object
Returns the value of attribute session_id.
Class Method Summary collapse
- .app_info ⇒ Object
- .app_info=(info) ⇒ Object
-
.log_level ⇒ Object
When set prompts the library to log some extra information to $stdout and $stderr about what it’s doing.
- .log_level=(val) ⇒ Object
-
.logger ⇒ Object
Sets a logger to which logging output will be sent.
- .logger=(val) ⇒ Object
- .max_network_retries ⇒ Object
- .max_network_retries=(val) ⇒ Object
- .session=(session) ⇒ Object
-
.set_app_info(name, partner_id: nil, url: nil, version: nil) ⇒ Object
Sets some basic information about the running application that’s sent along with API requests.
Class Attribute Details
.api_key ⇒ Object
Returns the value of attribute api_key.
153 154 155 |
# File 'lib/files.com.rb', line 153 def api_key @api_key end |
.base_url ⇒ Object
Returns the value of attribute base_url.
153 154 155 |
# File 'lib/files.com.rb', line 153 def base_url @base_url end |
.default_headers ⇒ Object
Returns the value of attribute default_headers.
153 154 155 |
# File 'lib/files.com.rb', line 153 def default_headers @default_headers end |
.initial_network_retry_delay ⇒ Object
Returns the value of attribute initial_network_retry_delay.
153 154 155 |
# File 'lib/files.com.rb', line 153 def initial_network_retry_delay @initial_network_retry_delay end |
.max_network_retry_delay ⇒ Object
Returns the value of attribute max_network_retry_delay.
153 154 155 |
# File 'lib/files.com.rb', line 153 def max_network_retry_delay @max_network_retry_delay end |
.open_timeout ⇒ Object
Returns the value of attribute open_timeout.
153 154 155 |
# File 'lib/files.com.rb', line 153 def open_timeout @open_timeout end |
.proxy ⇒ Object
Returns the value of attribute proxy.
153 154 155 |
# File 'lib/files.com.rb', line 153 def proxy @proxy end |
.read_timeout ⇒ Object
Returns the value of attribute read_timeout.
153 154 155 |
# File 'lib/files.com.rb', line 153 def read_timeout @read_timeout end |
.session_id ⇒ Object
Returns the value of attribute session_id.
153 154 155 |
# File 'lib/files.com.rb', line 153 def session_id @session_id end |
Class Method Details
.app_info ⇒ Object
229 230 231 |
# File 'lib/files.com.rb', line 229 def self.app_info @app_info end |
.app_info=(info) ⇒ Object
233 234 235 |
# File 'lib/files.com.rb', line 233 def self.app_info=(info) @app_info = info end |
.log_level ⇒ Object
When set prompts the library to log some extra information to $stdout and $stderr about what it’s doing. For example, it’ll produce information about requests, responses, and errors that are received. Valid log levels are ‘debug` and `info`, with `debug` being a little more verbose in places.
Use of this configuration is only useful when ‘.logger` is not set. When it is, the decision what levels to print is entirely deferred to the logger.
168 169 170 |
# File 'lib/files.com.rb', line 168 def self.log_level @log_level end |
.log_level=(val) ⇒ Object
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/files.com.rb', line 172 def self.log_level=(val) # Backwards compatibility for values that we briefly allowed case val when "debug" val = LEVEL_DEBUG when "info" val = LEVEL_INFO end if !val.nil? && ![ LEVEL_DEBUG, LEVEL_ERROR, LEVEL_INFO ].include?(val) raise ArgumentError, "log_level should only be set to `nil`, `debug` or `info`" end @log_level = val end |
.logger ⇒ Object
Sets a logger to which logging output will be sent. The logger should support the same interface as the ‘Logger` class that’s part of Ruby’s standard library (hint, anything in ‘Rails.logger` will likely be suitable).
If ‘.logger` is set, the value of `.log_level` is ignored. The decision on what levels to print is entirely deferred to the logger.
195 196 197 |
# File 'lib/files.com.rb', line 195 def self.logger @logger end |
.logger=(val) ⇒ Object
199 200 201 |
# File 'lib/files.com.rb', line 199 def self.logger=(val) @logger = val end |
.max_network_retries ⇒ Object
203 204 205 |
# File 'lib/files.com.rb', line 203 def self.max_network_retries @max_network_retries end |
.max_network_retries=(val) ⇒ Object
207 208 209 |
# File 'lib/files.com.rb', line 207 def self.max_network_retries=(val) @max_network_retries = val.to_i end |
.session=(session) ⇒ Object
211 212 213 214 |
# File 'lib/files.com.rb', line 211 def self.session=(session) session.save unless session.id self.session_id = session.id end |
.set_app_info(name, partner_id: nil, url: nil, version: nil) ⇒ Object
Sets some basic information about the running application that’s sent along with API requests.
Takes a name and optional partner program ID, plugin URL, and version.
220 221 222 223 224 225 226 227 |
# File 'lib/files.com.rb', line 220 def self.set_app_info(name, partner_id: nil, url: nil, version: nil) @app_info = { name: name, partner_id: partner_id, url: url, version: version, } end |