in

Pengaturan Lokal

Batal
IDR

Ubah mata uang

Batal

Add your Event to IndoKasih

Tambahkan Event

    Tambahkan List Event

Get a Fundraising Widget for your Event

IndoKasih have created a widget you can put on your website so other runenrs can see how much the participants are raising and have raised so far.

What information can I get from IndoKasih servers?

  1. Number of fundraising pages for your event
  2. Total mmount being targeted
  3. Total amount raised so far for charity
  4. Number of charities being donated to
  5. Event

How can I get my Widget?

To get your widget, simply create an account on InbdoKasih and call the API below using your username and password. You can style it however you like on your site as long as our logo is included with a link to our site so others can easily participate too.

How to access the API

Simply call the CURL script below from your server code replacing the email, password, url and currency fields with your own:

    curl --user [email protected]:my_password
        -d "event_url=asia-marathon&currency=USD"
        http://indokasih.com/api/v1/get_event

What does the API return?

The code above will return the JSON encoded message similar to the one below with all the above information for you to display on your website.


    {
        "name"                  : "Asia Marathon",
        "currency"              : "USD",
        "total_raising"         : "15,000",
        "total_raised"          : "1,542",
        "$total_runners"        : 12,
        "number_of_charities"   : 3
    }
        

How do I display the information on my page?

To display the information on your html page, you can use the javascript below:


    var event_details = //put API response here;

    document.getElementById('runners').innerHTML = event_details.total_runners;
    document.getElementById('raising').innerHTML = event_details.currency + " "
            + event_details.total_raising;
    document.getElementById('raised').innerHTML = event_details.currency + " "
            + event_details.total_raised;
    document.getElementById('charities').innerHTML =
            event_details.number_of_charities;

        

How about the HTML Formatting?

You can use your own or copy the design to the right by using the browser developer tools:


Tambahkan Event

Pelari:
Target:
Terkumpul:
Yayasan:
Tekan untuk Mulai