Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/dotnet/auth/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Data
// ---------------------------------------------------------------------------

string domain = "auth-stage.kiva.org";
string domain = "auth.staging.kiva.org"; // URI only, no protocol, no path
string clientId = System.Environment.GetEnvironmentVariable("client_id");
string clientSecret = System.Environment.GetEnvironmentVariable("client_secret");
string audience = System.Environment.GetEnvironmentVariable("audience");
Expand Down
4 changes: 2 additions & 2 deletions samples/dotnet/get.loan.themes/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
string PartnerId = "";
string BearerToken = "";
string dataFileName = "data.json";
string AuthDomain = "auth-stage.dk1.kiva.org";
string PartnerDomain = "partner-api-stage.dk1.kiva.org";
string AuthDomain = "auth.staging.kiva.org"; // URI only, no protocol, no path
string PartnerDomain = "partnerapi.staging.kiva.org"; // same as above, no protocol, no path
ThemeList themes = null; // loaded by GetThemes()

// ---------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions samples/dotnet/get.loans/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

string PartnerId = "";
string BearerToken = "";
string AuthDomain = "auth-stage.kiva.org";
string PartnerDomain = "partner-api-stage.kiva.org";
string AuthDomain = "auth.staging.kiva.org"; // URI only, no protocol, no path
string PartnerDomain = "partnerapi.staging.kiva.org"; // same as above, no protocol, no path


// ---------------------------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions samples/dotnet/journal/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
string PartnerId = "";
string BearerToken = "";
string dataFileName = "data.json";
string AuthDomain = "auth-stage.kiva.org";
string PartnerDomain = "partner-api-stage.kiva.org";
string AuthDomain = "auth.staging.kiva.org"; // URI only, no protocol, no path
string PartnerDomain = "partnerapi.staging.kiva.org"; // same as above, no protocol, no path



// ---------------------------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions samples/dotnet/loan.draft/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
string PartnerId = "";
string BearerToken = "";
string dataFileName = "data.json";
string AuthDomain = "auth-stage.kiva.org";
string PartnerDomain = "partner-api-stage.kiva.org";
string AuthDomain = "auth.staging.kiva.org"; // URI only, no protocol, no path
string PartnerDomain = "partnerapi.staging.kiva.org"; // same as above, no protocol, no path

ActivityList activities = null; // loaded by GetActivities()
LocaleList locales = null; // loaded by GetLocales()
ThemeList themes = null; // loaded by GetThemes()
Expand Down
9 changes: 5 additions & 4 deletions samples/dotnet/repayments/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
string PartnerId = "";
string BearerToken = "";
string dataFileName = "data.json";
string AuthDomain = "auth-stage.kiva.org";
string PartnerDomain = "partner-api-stage.kiva.org";
string AuthDomain = "auth.staging.kiva.org"; // URI only, no protocol, no path
string PartnerDomain = "partnerapi.staging.kiva.org"; // same as above, no protocol, no path


// ---------------------------------------------------------------------------
Expand Down Expand Up @@ -91,8 +91,9 @@ StringContent GetJsonData()
StringContent GetDataFromClass()
{
RepaymentHeader loan = new();
loan.Repayments.Add(new Repayment { LoanId = "loan_id_1", Amount = 480.00M, ClientId = "client_id_1" });

loan.Repayments.Add(new Repayment { LoanId = "loan_id", Amount = 1.00M, ClientId = "client_id" });

Console.WriteLine($"\r\nRepayment object created with {loan.Repayments.Count} repayments.\r\n");
string json = JsonSerializer.Serialize(loan);

Console.WriteLine($"Loan object serizlied to json: {json}");
Expand Down
5 changes: 3 additions & 2 deletions samples/python/get.loans/get.loans.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
limit = 20
PartnerId = ""
BearerToken = ""
AuthDomain = "auth-stage.dk1.kiva.org"
PartnerDomain = "partner-api-stage.dk1.kiva.org"
AuthDomain = "auth.staging.kiva.org"; // URI only, no protocol, no path
PartnerDomain = "partnerapi.staging.kiva.org"; // same as above, no protocol, no path


# ---------------------------------------------------------------------------
# Functions
Expand Down
2 changes: 1 addition & 1 deletion samples/typescript/src/demo/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const gethAuthToken = async () => {
log(`\twith secret '${process.env.client_secret}'`);

// URI to the staging system
const uri: string = 'https://auth-stage.kiva.org/oauth/token';
const uri: string = 'https://auth.staging.kiva.org/oauth/token';

// details are documented in
// https://kivapartnerhelpcenter.zendesk.com/hc/en-us/articles/360051231131-API-authentication-client-credential-flow-
Expand Down
4 changes: 2 additions & 2 deletions samples/typescript/src/demo/get.loans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const gethAuthToken = async () => {
log(`getting autho token using client_id '${process.env.client_id}'`);
log(`\twith secret '${process.env.client_secret}'`);

const uri = 'https://auth-stage.kiva.org/oauth/token';
const uri = 'https://auth.staging.kiva.orgg/oauth/token';
const details = {
grant_type: 'client_credentials',
scope: 'create:loan_draft read:loans',
Expand Down Expand Up @@ -53,7 +53,7 @@ const getLoans = async () => {
// get the auth token since that will be needed for the next call
await gethAuthToken();

const uri = `https://partner-api-stage.kiva.org/v3/partner/${partnerId}/loans`;
const uri = `https://partnerapi.staging.kiva.org/v3/partner/${partnerId}/loans`;
log(`calling ${uri}`);

// creating the headers. authToken value is retrieved from the function
Expand Down