Struct jyve::JyveClient

source ·
pub struct JyveClient {
    pub client: Client,
    /* private fields */
}

Fields§

§client: Client

Implementations§

source§

impl JyveClient

source

pub fn from_env() -> Self

source§

impl JyveClient

source

pub fn new(url: &str, authentication: JyveAuthentication) -> Self

source

pub fn with_authentication(self, authentication: JyveAuthentication) -> Self

source

pub fn with_middleware<M: Middleware + 'static>(self, middleware: M) -> Self

source

pub fn echo(&self) -> EchoRequest<'_>

source

pub fn account_device_register_device( &self ) -> AccountDeviceRegisterDeviceRequest<'_>

Use this endpoint to register devices

source

pub fn account_me_list(&self) -> AccountMeListRequest<'_>

Get current user details

source

pub fn auth_update_user_profile( &self, data: UpdatedUser ) -> AuthUpdateUserProfileRequest<'_>

Update current user profile

source

pub fn account_me_lessonly_refresh_list( &self ) -> AccountMeLessonlyRefreshListRequest<'_>

Refresh User object with lessonly data for that user. Synchronous request to Lessonly API. Eg. lessonly ext uid, lessonly uid. Invoked on client login.

source

pub fn account_me_lessonly_refresh_create( &self, data: CurrentUser ) -> AccountMeLessonlyRefreshCreateRequest<'_>

Refresh User object with lessonly data for that user in the background. Asynchronous request to Lessonly API. Eg. lessonly ext uid, lessonly uid.

source

pub fn account_onboarding_read(&self) -> AccountOnboardingReadRequest<'_>

source

pub fn account_onboarding_create(&self) -> AccountOnboardingCreateRequest<'_>

source

pub fn account_onboarding_certification_requirements( &self ) -> AccountOnboardingCertificationRequirementsRequest<'_>

Return the certification and requirements for a Skills Demo that best fits the user’s chosen job type and brand.

source

pub fn account_onboarding_job_types( &self ) -> AccountOnboardingJobTypesRequest<'_>

Return a list of job types that are within 50 miles of the user’s postal code, with title, description and demand (‘high’ or ‘medium’) for each job type.

source

pub fn account_onboarding_run_background_check( &self ) -> AccountOnboardingRunBackgroundCheckRequest<'_>

source

pub fn account_onboarding_update_user_ssn( &self, data: UserSsnUpdate ) -> AccountOnboardingUpdateUserSsnRequest<'_>

update user ssn then run background check

source

pub fn account_onboarding_step_complete_step( &self, step_id: &str ) -> AccountOnboardingStepCompleteStepRequest<'_>

source

pub fn account_onboarding_step_rerun_step( &self, step_id: &str ) -> AccountOnboardingStepRerunStepRequest<'_>

source

pub fn account_onboarding_verify_location_availability( &self, data: LocationAvailability ) -> AccountOnboardingVerifyLocationAvailabilityRequest<'_>

Verify if we are available in user location

source

pub fn account_opt_out(&self) -> AccountOptOutRequest<'_>

Allows a user to opt out of jyve, deactivating them. Also allows for the option of opting out of marketing communications

source

pub fn account_password_create( &self, data: PasswordRetype ) -> AccountPasswordCreateRequest<'_>

Set a user’s password

source

pub fn account_password_reset_create( &self, data: PasswordReset ) -> AccountPasswordResetCreateRequest<'_>

Send user a password reset email

source

pub fn account_password_reset_confirm_create( &self, data: PasswordResetConfirmRetype ) -> AccountPasswordResetConfirmCreateRequest<'_>

Used to reset password from link sent to user in password reset email

source

pub fn api_token_auth_create( &self, data: AuthToken ) -> ApiTokenAuthCreateRequest<'_>

source

pub fn auth_is_valid(&self) -> AuthIsValidRequest<'_>

source

pub fn auth_login(&self, data: User) -> AuthLoginRequest<'_>

Login with this endpoint

source

pub fn auth_send_mobile_verification( &self, data: RequestCode ) -> AuthSendMobileVerificationRequest<'_>

Send Sms verification to existing User

source

pub fn auth_verify_mobile( &self, data: VerifyCode ) -> AuthVerifyMobileRequest<'_>

Log User In with SMS CODE

source

pub fn auth_verify_only_mobile( &self, data: VerifyCode ) -> AuthVerifyOnlyMobileRequest<'_>

Verify Number, You need to be logged in to do this, This is used to update number

source

pub fn brand_notes_list(&self) -> BrandNotesListRequest<'_>

All Brand Notes ViewSet

source

pub fn brand_notes_create(&self, data: BrandNote) -> BrandNotesCreateRequest<'_>

All Brand Notes ViewSet

source

pub fn brand_notes_read(&self, id: i64) -> BrandNotesReadRequest<'_>

All Brand Notes ViewSet

source

pub fn brand_notes_update( &self, data: BrandNote, id: i64 ) -> BrandNotesUpdateRequest<'_>

All Brand Notes ViewSet

source

pub fn brand_notes_delete(&self, id: i64) -> BrandNotesDeleteRequest<'_>

Override DRF’s default destroy/DELETE and replace with archiving

source

pub fn brand_notes_partial_update( &self, data: BrandNotePartialUpdate, id: i64 ) -> BrandNotesPartialUpdateRequest<'_>

All Brand Notes ViewSet

source

pub fn brands_list(&self) -> BrandsListRequest<'_>

Lists brands

source

pub fn client_dashboard_backstock_available( &self ) -> ClientDashboardBackstockAvailableRequest<'_>

source

pub fn client_dashboard_brand_overview( &self ) -> ClientDashboardBrandOverviewRequest<'_>

source

pub fn client_dashboard_completion_rate( &self ) -> ClientDashboardCompletionRateRequest<'_>

source

pub fn client_dashboard_export_jobs( &self ) -> ClientDashboardExportJobsRequest<'_>

source

pub fn client_dashboard_export(&self) -> ClientDashboardExportRequest<'_>

source

pub fn client_dashboard_ratings(&self) -> ClientDashboardRatingsRequest<'_>

source

pub fn client_dashboard_mode(&self) -> ClientDashboardModeRequest<'_>

source

pub fn client_dashboard_stocking(&self) -> ClientDashboardStockingRequest<'_>

source

pub fn client_dashboard_stores_visited( &self ) -> ClientDashboardStoresVisitedRequest<'_>

source

pub fn contact_us_create(&self, data: ContactUs) -> ContactUsCreateRequest<'_>

Creates a job request

__TODO: Add proper error codes to responses__
source

pub fn credentials_list(&self) -> CredentialsListRequest<'_>

source

pub fn credentials_list_fulfilled(&self) -> CredentialsListFulfilledRequest<'_>

/credentials/fulfilled/ids?= Retrieve list of credentials that a user has fulfilled and those specified by ids (even if they haven’t been fulfilled) only.

source

pub fn credentials_read(&self, id: &str) -> CredentialsReadRequest<'_>

source

pub fn credentials_detail_fulfilled( &self, id: &str ) -> CredentialsDetailFulfilledRequest<'_>

/credentials//fulfilled/

source

pub fn deliveries_list(&self) -> DeliveriesListRequest<'_>

Deliveries!

source

pub fn deliveries_read(&self, id: i64) -> DeliveriesReadRequest<'_>

Deliveries!

source

pub fn geo_jyver_density(&self) -> GeoJyverDensityRequest<'_>

source

pub fn insights_backstock_available( &self ) -> InsightsBackstockAvailableRequest<'_>

source

pub fn insights_brand_overview(&self) -> InsightsBrandOverviewRequest<'_>

source

pub fn insights_completion_rate(&self) -> InsightsCompletionRateRequest<'_>

source

pub fn insights_export_jobs(&self) -> InsightsExportJobsRequest<'_>

source

pub fn insights_export(&self) -> InsightsExportRequest<'_>

source

pub fn insights_ratings(&self) -> InsightsRatingsRequest<'_>

source

pub fn insights_mode(&self) -> InsightsModeRequest<'_>

source

pub fn insights_stocking(&self) -> InsightsStockingRequest<'_>

source

pub fn insights_stores_visited(&self) -> InsightsStoresVisitedRequest<'_>

source

pub fn job_templates_list(&self) -> JobTemplatesListRequest<'_>

source

pub fn job_templates_read(&self, id: i64) -> JobTemplatesReadRequest<'_>

source

pub fn jobs_list(&self) -> JobsListRequest<'_>

Returns a list of jobs.

source

pub fn jobs_list_downgrade_ja( &self, data: Job ) -> JobsListDowngradeJaRequest<'_>

All job endpoints

source

pub fn jobs_generate_jobs( &self, data: GenerateJobsInput ) -> JobsGenerateJobsRequest<'_>

Generate jobs for demo

source

pub fn jobs_list_geo(&self) -> JobsListGeoRequest<'_>

Returns all jobs with

source

pub fn jobs_request_job_changes_new( &self, data: Job ) -> JobsRequestJobChangesNewRequest<'_>

Makes edits to a job after it has been created.

source

pub fn jobs_request_job_changes( &self, data: Job ) -> JobsRequestJobChangesRequest<'_>

Makes edits to a job after it has been created.

source

pub fn jobs_request_jobs_new(&self, data: Job) -> JobsRequestJobsNewRequest<'_>

All job endpoints

source

pub fn jobs_request_jobs(&self, data: Job) -> JobsRequestJobsRequest<'_>

Request a new job at a store.

source

pub fn jobs_list_stats(&self) -> JobsListStatsRequest<'_>

Returns job stats. Takes all same params as the /jobs/ endpoint (plus a few new ones, detailed below) —

source

pub fn jobs_list_stats2(&self) -> JobsListStats2Request<'_>

All job endpoints

source

pub fn jobs_list_stats_report(&self) -> JobsListStatsReportRequest<'_>

All job endpoints

source

pub fn jobs_list_status(&self) -> JobsListStatusRequest<'_>

List statuses jobs can have

source

pub fn jobs_list_swap(&self, data: Job) -> JobsListSwapRequest<'_>

Allows a user to atomically swap a job with another job by unclaiming and then claiming.

TODO(@wesleykendall) - Migrate this to the django-action-framework
once it supports this type of use case.
source

pub fn jobs_list_types(&self) -> JobsListTypesRequest<'_>

List types of jobs

source

pub fn jobs_list_unreserve(&self, data: Job) -> JobsListUnreserveRequest<'_>

Unreserve jobs in bulk for a single user

source

pub fn jobs_list_upgrade_to_ja( &self, data: Job ) -> JobsListUpgradeToJaRequest<'_>

Upgrade jobs in bulk for a single user

source

pub fn jobs_read(&self, id: i64) -> JobsReadRequest<'_>

Returns a job.

source

pub fn jobs_detail_cancel( &self, data: Job, id: i64 ) -> JobsDetailCancelRequest<'_>

All job endpoints

source

pub fn jobs_detail_complete( &self, data: Job, id: i64 ) -> JobsDetailCompleteRequest<'_>

All job endpoints

source

pub fn jobs_detail_downgrade_from_jyve_along( &self, data: Job, id: i64 ) -> JobsDetailDowngradeFromJyveAlongRequest<'_>

All job endpoints

source

pub fn jobs_detail_report_issue( &self, data: Job, id: i64 ) -> JobsDetailReportIssueRequest<'_>

All job endpoints

source

pub fn jobs_detail_claim( &self, data: Job, id: i64 ) -> JobsDetailClaimRequest<'_>

All job endpoints

source

pub fn jobs_detail_reset( &self, data: Job, id: i64 ) -> JobsDetailResetRequest<'_>

All job endpoints

source

pub fn jobs_detail_self_serve_cancel( &self, data: Job, id: i64 ) -> JobsDetailSelfServeCancelRequest<'_>

All job endpoints

source

pub fn jobs_detail_set_eta( &self, data: Job, id: i64 ) -> JobsDetailSetEtaRequest<'_>

All job endpoints

source

pub fn jobs_detail_start( &self, data: Job, id: i64 ) -> JobsDetailStartRequest<'_>

All job endpoints

source

pub fn jobs_detail_submit_feedback( &self, data: Job, id: i64 ) -> JobsDetailSubmitFeedbackRequest<'_>

All job endpoints

source

pub fn jobs_detail_unclaim( &self, data: Job, id: i64 ) -> JobsDetailUnclaimRequest<'_>

All job endpoints

source

pub fn jobs_detail_upgrade_to_jyve_along( &self, data: Job, id: i64 ) -> JobsDetailUpgradeToJyveAlongRequest<'_>

All job endpoints

source

pub fn jwt_token_create( &self, data: JyveTokenObtainPair ) -> JwtTokenCreateRequest<'_>

source

pub fn jwt_token_delete_create(&self) -> JwtTokenDeleteCreateRequest<'_>

Deletes httpOnly auth cookies. Used as logout view while using AUTH_COOKIE

source

pub fn jwt_token_refresh_create( &self, data: TokenRefresh ) -> JwtTokenRefreshCreateRequest<'_>

Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid.

source

pub fn jwt_token_verify_create( &self, data: TokenVerify ) -> JwtTokenVerifyCreateRequest<'_>

Takes a token and indicates if it is valid. This view provides no information about a token’s fitness for a particular use.

source

pub fn mobile_sms(&self, data: Sms) -> MobileSmsRequest<'_>

source

pub fn notifications_list(&self) -> NotificationsListRequest<'_>

source

pub fn notifications_list_acknowledge( &self, data: Notification ) -> NotificationsListAcknowledgeRequest<'_>

Bulk acknowledge a list of Notifications. request format: { “notifications”: [{ “id”: “288277”, “should_hide”: true/false }, { “id”: “288265” }] }

source

pub fn notifications_push_notification_acknowledge_action_create( &self ) -> NotificationsPushNotificationAcknowledgeActionCreateRequest<'_>

Acknowledge a push notification action

source

pub fn notifications_push_notification_acknowledged_create( &self ) -> NotificationsPushNotificationAcknowledgedCreateRequest<'_>

Acknowledge a push notification

source

pub fn notifications_read(&self, id: &str) -> NotificationsReadRequest<'_>

source

pub fn notifications_single_acknowledge( &self, data: Notification, id: &str ) -> NotificationsSingleAcknowledgeRequest<'_>

Acknowledge a single Notification and related PushNotification. and set the action_taken_at of related pn’s to now. (previously NotificationActionAcknowledged class) request format: /notifications/{pk}/acknowledge-action/ { “push_notification_id”: “777777”, “action”: “…” }

source

pub fn payments_list(&self) -> PaymentsListRequest<'_>

source

pub fn payments_list_daily_earnings( &self ) -> PaymentsListDailyEarningsRequest<'_>

Return a list of daily earnings as specified by

source

pub fn payments_list_weekly_earnings( &self ) -> PaymentsListWeeklyEarningsRequest<'_>

Return a list of aggregated weekly earnings grouped by fiscal week/day.

source

pub fn payments_read(&self, id: i64) -> PaymentsReadRequest<'_>

source

pub fn payouts_detail_earnings_count( &self ) -> PayoutsDetailEarningsCountRequest<'_>

Simple workaround for retrieving total earnings payout and ‘count’.

source

pub fn payouts_list_earnings(&self) -> PayoutsListEarningsRequest<'_>

source

pub fn products_list(&self) -> ProductsListRequest<'_>

source

pub fn rating_requests_create( &self, data: RatingRequest ) -> RatingRequestsCreateRequest<'_>

source

pub fn rating_requests_rate( &self, data: RatingRequest ) -> RatingRequestsRateRequest<'_>

Rates an object or updates an existing rating

source

pub fn rating_requests_read(&self, id: i64) -> RatingRequestsReadRequest<'_>

Gets a rating object that associated with rating request

source

pub fn ratings_create(&self, data: Rating) -> RatingsCreateRequest<'_>

Rate an brand, job, or user or update existing rating.

source

pub fn ratings_read(&self, id: i64) -> RatingsReadRequest<'_>

All ratings endpoints

source

pub fn referrals_create_fast_track_referral( &self ) -> ReferralsCreateFastTrackReferralRequest<'_>

Create a fast-track referral, and return the referral code and URL.

source

pub fn retailer_jobs_kroger(&self) -> RetailerJobsKrogerRequest<'_>

Job Endpoints for External Clients

source

pub fn review_responses_list(&self) -> ReviewResponsesListRequest<'_>

Endpoint method which returns the responses belong to a review.

source

pub fn review_responses_create( &self, data: ReviewResponse ) -> ReviewResponsesCreateRequest<'_>

Review response endpoints.

source

pub fn review_responses_read(&self, id: i64) -> ReviewResponsesReadRequest<'_>

Review response endpoints.

source

pub fn reviews_list(&self) -> ReviewsListRequest<'_>

Review endpoints.

source

pub fn reviews_list_status(&self) -> ReviewsListStatusRequest<'_>

Returns all the statuses a review can have.

source

pub fn reviews_read(&self, id: i64) -> ReviewsReadRequest<'_>

Review endpoints.

source

pub fn reviews_review_response( &self, data: ReviewResponseAction, id: i64 ) -> ReviewsReviewResponseRequest<'_>

Adds response to a review.

source

pub fn services_app_vars(&self) -> ServicesAppVarsRequest<'_>

Returns mobile constants

source

pub fn services_aws_save_image_url_to_task( &self ) -> ServicesAwsSaveImageUrlToTaskRequest<'_>

POST hook from S3 Event Notifications when an image is uploaded

source

pub fn services_s3_task_image_upload_presigned_url_create( &self, data: S3Url ) -> ServicesS3TaskImageUploadPresignedUrlCreateRequest<'_>

This endpoint returns a presigned url for uploading a file to S3. Used for uploading images to tasks.

source

pub fn services_zendesk_post(&self) -> ServicesZendeskPostRequest<'_>

Zendesk push notifications hit this endpoint to send out a push notification of our own to our users

source

pub fn store_chains_list(&self) -> StoreChainsListRequest<'_>

source

pub fn store_groups_list(&self) -> StoreGroupsListRequest<'_>

Endpoint for retrieving StoreGroups, such as regions/areas/etc.

source

pub fn store_groups_market_lookup(&self) -> StoreGroupsMarketLookupRequest<'_>

request url format: ‘../store_groups/market_lookup/?postal_code=98012’ postal_code query param is required here.

Given a postal code, returns most likely StoreGroup area,
StoreGroup market,and city associations. If no
likely market/city from our records, return the
default market and use Google geocode api to get likely city.

Uses PostalCode model.

Using list route here because although only one StoreGroup is
expected, detail_route is for urls with model ids and this is more
of a filtered set - trying to keep it RESTful.
source

pub fn store_groups_read(&self, id: i64) -> StoreGroupsReadRequest<'_>

Endpoint for retrieving StoreGroups, such as regions/areas/etc.

source

pub fn stores_list(&self) -> StoresListRequest<'_>

Returns a list of stores.

All query params that accept times accept 'now', 'midnight',
'midnight_tomorrow', and datetime str that can be understood
by arrow.get(datetime_str).
source

pub fn stores_filters_list_filters_achievements( &self ) -> StoresFiltersListFiltersAchievementsRequest<'_>

Filter the available jobs by achievements

source

pub fn stores_filters_list_filters_brands( &self ) -> StoresFiltersListFiltersBrandsRequest<'_>

Filter the available jobs by brands

source

pub fn stores_list_stats(&self) -> StoresListStatsRequest<'_>

Store stats

source

pub fn stores_read(&self, id: i64) -> StoresReadRequest<'_>

Returns a single store.

source

pub fn tasks_list(&self) -> TasksListRequest<'_>

Lists tasks

source

pub fn tasks_list_stats(&self) -> TasksListStatsRequest<'_>

Returns task stats. Takes all same params as the /tasks/ endpoint (plus a few new ones, detailed below) —

source

pub fn tasks_read(&self, id: i64) -> TasksReadRequest<'_>

Gets a task

source

pub fn tasks_detail_complete( &self, data: Task, id: i64 ) -> TasksDetailCompleteRequest<'_>

Completes a Task

source

pub fn tasks_detail_reset( &self, data: Task, id: i64 ) -> TasksDetailResetRequest<'_>

All task endpoints

source

pub fn tos_list(&self) -> TosListRequest<'_>

TOS endpoints

source

pub fn tos_agree(&self, data: Tos) -> TosAgreeRequest<'_>

TOS endpoints

source

pub fn tos_current(&self) -> TosCurrentRequest<'_>

TOS endpoints

source

pub fn tos_read(&self, id: i64) -> TosReadRequest<'_>

TOS endpoints

source

pub fn detail(&self, data: Tos) -> DetailRequest<'_>

TOS endpoints

source

pub fn users_list(&self) -> UsersListRequest<'_>

All Users Viewset

source

pub fn users_list_jyvers(&self) -> UsersListJyversRequest<'_>

All Users Viewset

source

pub fn users_list_market_managers(&self) -> UsersListMarketManagersRequest<'_>

All Users Viewset

source

pub fn verify_code_list(&self) -> VerifyCodeListRequest<'_>

Use this endpoint to verify a variety of different codes. Currently, only referral codes are supported.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more