Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

FC-76 training provider search #95

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

dashton82
Copy link
Contributor

Implemented end point for getting training providers by postcode and standard

Added service call for PostCode IO to get the lat and long for a given
postcode. Add configuration setting and also HttpClient implementation
with interface
Implemented the GetProvidersByPostCodeAndStandard into the provider
repository and also the providers controller.
@@ -131,5 +132,13 @@ public async Task<IEnumerable<Standard>> GetStandardsByIdAsync(List<string> ids,
return await RequestAndDeserialiseAsync<IEnumerable<Standard>>(request);
}
}

public async Task<IEnumerable<StandardProvider>> GetProvidersByStandardAndLocation(int standardCode, string postCode, int page = 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add "Async" to the name and create a synchronous method as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed name of method and added sync call

public IEnumerable<StandardProvider> GetProvidersByStandardAndLocation(int standardCode, string postCode,int page = 1)
{
return GetProvidersByStandardAndLocationAsync(standardCode, postCode, page).Result;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not to use RequestAndDeserialise as we have at the rest of the methods?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants