This file contains hidden or 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
| { | |
| "page": 1, | |
| "total_results": 1687, | |
| "total_pages": 85, | |
| "results": [ | |
| { | |
| "vote_count": 1543, | |
| "id": 181808, | |
| "video": false, | |
| "vote_average": 7.4, |
This file contains hidden or 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
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_main); | |
| Retrofit retrofit = new Retrofit.Builder() | |
| .baseUrl("https://api.github.com") | |
| .addConverterFactory(GsonConverterFactory.create()) | |
| .build(); |
This file contains hidden or 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
| private void loadGithubUsers() { | |
| getSupportLoaderManager().restartLoader(LOADER_ID, null, this); | |
| } |
This file contains hidden or 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
| @Override | |
| public Loader<List<User>> onCreateLoader(int id, Bundle args) { | |
| return new AsyncTaskLoader<List<User>>(this) { | |
| List<User> users; | |
| @Override | |
| protected void onStartLoading() { | |
| super.onStartLoading(); | |
| if (users == null) { |
This file contains hidden or 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
| @Override | |
| public void onLoadFinished(Loader<List<User>> loader, List<User> data) { | |
| if (data != null) { | |
| mAdapter.swapData(data); | |
| } | |
| } |
This file contains hidden or 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
| private async Task<Passenger> GetPermanentPassengerByPhoneNumber(PhoneNumberViewModel phoneNumberVM) | |
| { | |
| var phoneNumber = new PhoneNumber(phoneNumberVM.CountryCode, phoneNumberVM.Number); | |
| var phoneCriteria = new PassengerByPhoneSpecification(phoneNumber); | |
| var permanentPassengerCriteria = new PermanentPassengerSpecification(); | |
| return await _passengerRepository.FindOne( | |
| phoneCriteria.AndSpecification(permanentPassengerCriteria)); | |
| } | |
| public class PassengerByPhoneSpecification : Specification<Passenger> |
This file contains hidden or 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
| using System; | |
| using System.Globalization; | |
| namespace Taksapp.Domain.ValueObjects | |
| { | |
| public class PhoneNumber : ValueObject<PhoneNumber> | |
| { | |
| public static readonly PhoneNumber NoPhoneNumber = new PhoneNumber(); | |
| public int RegionCode { get; protected set; } |
This file contains hidden or 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
| public class Passenger : Entity<Passenger, Guid> | |
| { | |
| public string FirstName { get; protected set; } | |
| public string LastName { get; protected set; } | |
| public string EmailAddress { get; protected set; } | |
| public bool EmailConfirmed { get; set; } | |
| public PhoneNumber PhoneNumber { get; protected set; } = PhoneNumber.NoPhoneNumber; | |
| public string SmartphoneId { get; protected set; } | |
| public string ProfilePhotoUri { get; protected set; } | |
| } |
This file contains hidden or 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
| export PATH=~/development/flutter/bin:$PATH |
This file contains hidden or 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
| val taksapp = Taksapp.Builder() | |
| .onSessionExpired(sessionExpiryCallback) | |
| .tokensStore(tokensStore) | |
| .environment(Environment.PRODUCTION) | |
| .build(); | |
| val signUpRequest = taksapp.users.signUpBuilder() | |
| .firstName("Henrick") | |
| .lastName("Kakutalua") | |
| .phoneNumber("+244925571908") |