- A .NET version of SEEK's Job Ad Posting API Client which can be installed via NuGet.
- It comprises of the following three projects:
- SEEK.AdPostingApi.Client - Source code of the API client
- SEEK.AdPostingApi.SampleConsumer - Example code using the API client to make requests to the Job Ad Posting API
- SEEK.AdPostingApi.Client.Tests - Contract (PACT) tests between the API client and the Job Ad Posting API.
- Exchanges the OAuth 2.0 credentials (client key and client secret) for an OAuth 2.0 access token.
- Using the OAuth 2.0 access token:
- Retrieves the API links from the Job Ad Posting API.
- Depending on the operation (create, update, retrieve or expire):
- Builds the appropriate API link for the operation.
- Makes the appropriate request to the API.
- Job Ad Posting API Documentation
- NuGet Package
- Release Notes
- Contract (PACT) Between the API Client and the Job Ad Posting API
Via NuGet with Install-Package SEEK.AdPostingApi.Client
To initialize a client, the following values are needed:
- Client Key [Required]: the client key for getting an OAuth 2 access token
- Client Secret [Required]: the client secret for getting an OAuth 2 access token
- Environment [Optional]: the environment to which your consumer will integrate with, either "Integration" or "Production" can be supplied. Without supplying anything, "Production" will be used by default.
- AdPostingApiBaseUrl [Optional]: the URL of the Job Ad Posting API. Without supplying anything, the Production URL will be used by default.
IAdPostingApiClient postingClient = new AdPostingApiClient("<client id>", "<client secret>", Environment.Integration);
var ad = new Advertisement
{
CreationId = "Sample Consumer 20151001 114732 1234567",
ThirdParties = new ThirdParties { AdvertiserId = "Advertiser Id" },
JobTitle = "A Job Title",
JobSummary = "Job summary of the job ad",
AdvertisementDetails = "Experience Required",
AdvertisementType = AdvertisementType.Classic,
WorkType = WorkType.Casual,
Salary = new Salary
{
Type = SalaryType.HourlyRate,
Minimum = 20,
Maximum = 24
},
Location = new Location
{
Id = "Melbourne",
AreaId = "MelbourneNorthernSuburbs"
},
SubclassificationId = "AerospaceEngineering"
};
AdvertisementResource advertisement = await postingClient.CreateAdvertisementAsync(ad);