Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

  Click here to go to the first staff post in this thread.   Thread: Welcome to the Clash of Clans developer subforum

  1. #11
    Fresh Spawn
    Join Date
    Aug 2015
    Posts
    9
    Thanks Supercell for the work you've done to help out fanatics of CoC with releasing the API and creating this forum. I started to learn programming to help out my clan with warring and keeping track of our stats. I'm excited for what the future brings!

  2. #12
    Hey! Is there any information about API update status and what new data will be in it?

  3. #13
    Fresh Spawn deathly16's Avatar
    Join Date
    Jul 2016
    Location
    Los Angeles, CAlifornia
    Posts
    3
    Hello Everyone,

    I have the API loading raw data, but does anybody know how to display it as html?

    Thanks in advance Clashers!

  4. #14
    Centennial Club
    Join Date
    Oct 2015
    Posts
    186
    Quote Originally Posted by deathly16 View Post
    I have the API loading raw data, but does anybody know how to display it as html?
    An exceptionally broad question. Kind of like saying-- I have a bunch of wood and nails, but does anyone know how to build a house?

    The short of the long is that you need to write a program to transform the data into HTML and a webserver to display it. There are more ways to do that then I have time to cover. Is there a particular computer language you are already strong in?

  5. #15
    Fresh Spawn deathly16's Avatar
    Join Date
    Jul 2016
    Location
    Los Angeles, CAlifornia
    Posts
    3
    Quote Originally Posted by CaptEmulation View Post
    An exceptionally broad question. Kind of like saying-- I have a bunch of wood and nails, but does anyone know how to build a house?

    The short of the long is that you need to write a program to transform the data into HTML and a webserver to display it. There are more ways to do that then I have time to cover. Is there a particular computer language you are already strong in?
    You are right Capt, my bad for not been more specific.

    I am familiar with php and an expert with html and css. What I want to do is to output the data from the API into a HTML table like the example here http://www.w3schools.com/html/tryit....=tryhtml_table. To give you an idea this is what I have so far http://ssp-la.net/demos/coc/

    I would appreciated if you can help me with this. Is this information enough?

  6. #16
    Centennial Club
    Join Date
    Oct 2015
    Posts
    186
    Awesome! You are most of the way there! My PHP skills are rusty and I only used ZendFramework. From your demo, I am going to assume you know how to create the route and push data to browser. Now you need to create the PHP HTML template (e.g. .phtml) to unroll and format the data. You can inject PHP code using the <?php ?> delimiters. Inside these delimiters you can run the PHP code to create loops and extract data from the data structure returned by the API. You probably want to run json_decode on the response from the CoC API to convert the response into PHP data structures. I know that this is all very broad but I hope it helps.

  7. #17
    Fresh Spawn deathly16's Avatar
    Join Date
    Jul 2016
    Location
    Los Angeles, CAlifornia
    Posts
    3

    API info decode solved!

    Quote Originally Posted by CaptEmulation View Post
    Awesome! You are most of the way there! My PHP skills are rusty and I only used ZendFramework. From your demo, I am going to assume you know how to create the route and push data to browser. Now you need to create the PHP HTML template (e.g. .phtml) to unroll and format the data. You can inject PHP code using the <?php ?> delimiters. Inside these delimiters you can run the PHP code to create loops and extract data from the data structure returned by the API. You probably want to run json_decode on the response from the CoC API to convert the response into PHP data structures. I know that this is all very broad but I hope it helps.
    Thanks a lot Capt!

    Since I am completely clueless about JSON, your suggestion to use json_decode helped me figure out the whole thing.

    This is pretty rough but I got the information to load into a readable format

    Check it out here
    http://www.ssp-la.net/demos/coc/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •