Documentation ¶
Index ¶
- type MFPClient
- func (m *MFPClient) InitialLoad() error
- func (m *MFPClient) RefreshToken() error
- func (m *MFPClient) SearchFoodWithoutAuth(foodName string, offset int, page int) (*models.FoodSearchResponseWithoutAuth, error)
- func (m *MFPClient) SearchFoodWithoutPagination(foodName string) (*models.FoodSearchResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MFPClient ¶
type MFPClient struct { AuthSignKey []byte // signing key which has to be decoded first ClientKeys *models.ClientKeyResponse // client keys for creating and signing jwts AccessToken *models.AccessTokenResponse // access tokens for communicating with identity api IDTokenResponse *models.TokenResponse // tokens for communicating with general api Username string // email/username from mfp acc Password string // password from mfp acc JWT string // own generated & signed jwt for login MFPCallbackCode string // callback code for login process MFPUserID string // user id for login process UserID string // domain user id for api requests }
MFPClient offers methods to get food products from MyFitnessPal
func (*MFPClient) InitialLoad ¶
InitialLoad does the initial login part starts at getting clientkeys till creating JWTs for login
func (*MFPClient) SearchFoodWithoutAuth ¶
func (m *MFPClient) SearchFoodWithoutAuth(foodName string, offset int, page int) (*models.FoodSearchResponseWithoutAuth, error)
It could be possible that this endpoint won't work in the future
func (*MFPClient) SearchFoodWithoutPagination ¶
func (m *MFPClient) SearchFoodWithoutPagination(foodName string) (*models.FoodSearchResponse, error)
Any food product that you like
Click to show internal directories.
Click to hide internal directories.