-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from my1562/interactivity
Interactivity
- Loading branch information
Showing
4 changed files
with
105 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package mock_apiclient | ||
|
||
import "github.com/my1562/telegrambot/pkg/apiclient" | ||
|
||
type MockApiClient struct{} | ||
|
||
func New() apiclient.IApiClient { | ||
return &MockApiClient{} | ||
} | ||
|
||
func (api *MockApiClient) CreateSubscription(chatID int64, addressArID int64) error { | ||
return nil | ||
} | ||
func (api *MockApiClient) Geocode( | ||
lat float64, | ||
lng float64, | ||
accuracy float64, | ||
) (*apiclient.GeocodeResponse, error) { | ||
return &apiclient.GeocodeResponse{ | ||
Addresses: []apiclient.GeocodeResponseAddress{ | ||
{5, 10, "221b Baker st."}, | ||
{6, 12, "1 Lenin st."}, | ||
}, | ||
}, nil | ||
} | ||
|
||
func (api *MockApiClient) AddressStringByID( | ||
ID int64, | ||
) (string, error) { | ||
return "221b Baker st.", nil | ||
} |