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

Thread: API requirements

  1. #11

    Join Date
    Jun 2015
    Location
    Stealing your DE
    Posts
    735
    Quote Originally Posted by Deedolith View Post
    err, to my knowledge, my local IP (192.168.x.x) is private, and not resolved by any DNS on the internet. Plus I'm behind a box (firewall + router) with dynamic IP.

    Ok, some can say that dynamic IPs given by DHCP servers don't change often, but it does. If I'm allowed to use only one key with the API, that's a risk that I'm unwilling to take.
    192.xxx.xxx.xxx is indeed private, if you enter this IP it will not work. Go to ifconfig.io to check your IP, then you can test locally. You only have to set a new key from time to time, if your router reconnects (when you reboot it or when there is no data transferred anymore)
    Werner der Champ German CoC Wiki Admin (Link)
    My Ideas:Matchmaking fix for Legends|Cat troop idea|Ultimate Clash Royale Tournament idea
    Quote Originally Posted by WernerderChamp View Post
    Are you again waiting till 100,000,000 total clicks on "Try again" ?

    Quote Originally Posted by Stitch View Post
    Yes. Please hurry up with the final 10,000 taps!


  2. #12
    Junior Member
    Join Date
    May 2016
    Posts
    94
    Additional question:

    What if I write an app able to send / recieve HTTP requests ?
    Will I still need a web server ?

  3. #13
    Junior Member
    Join Date
    Oct 2015
    Posts
    52
    To your first questions I would like to add the following:
    As said previously, you can only work using a static ip-address to fetch data from the API.
    Some internet providers give you the option to make static your address so you could work with that at your home.

    I'm not sure it works with JSON but if that's the interface you want to use you could link table from a mysql server on your windows machine (using mysql-connector-odbc if I remember well) and deal with them like any other table in ms access.

    That would mean you could use data from mysql but you would still have to build some other code outside of ms access to record this data in your tables. There are some php scripts on the forum that could help you additionally to the API documentation.

    Lastly for your last questions, every pc can send request to the API and get results, I'm not sure it makes them web server but they can host web pages !
    If you want to go this way I recommend you have a look to the "WAMP-Server" software, web developers use it to have a local copy of a website and work on it before publication.
    Since you can run php, mysql, curl and pretty much anything with it, it works fine with the API!
    Last edited by OriOn86; November 18th, 2016 at 12:02 PM. Reason: typo

  4. #14

    Join Date
    Jun 2015
    Location
    Stealing your DE
    Posts
    735
    Quote Originally Posted by Deedolith View Post
    Additional question:

    What if I write an app able to send / recieve HTTP requests ?
    Will I still need a web server ?
    Trying out on the PC works great. Also note you can only get data, not send.

    Quote Originally Posted by OriOn86 View Post
    To your first questions I would like to add the following:
    As said previously, you can only work using a static ip-address to fetch data from the API.
    Some internet providers give you the option to make static your address so you could work with that at your home.
    If not, you'll have to set up a key for each session
    Quote Originally Posted by OriOn86 View Post
    I'm not sure it works with JASON but if that's the interface you want to use you could link table from a mysql server on your windows machine (using mysql-connector-odbc if I remember well) and deal with them like any other table in ms access.

    That would mean you could use data from mysql but you would still have to build some other code outside of ms access to record this data in your tables. There are some php scripts on the forum that could help you additionally to the API documentation.
    Yes, just look in the sticky. Php the the most easiest to try out on your PC.
    (btw. ist JSON, not JASON)
    Quote Originally Posted by OriOn86 View Post
    Lastly for your last questions, every pc can send request to the API and get results, I'm not sure it makes them web server but they can host web pages !
    If you want to go this way I recommend you have a look to the "WAMP-Server" software, web developers use it to have a local copy of a website and work on it before publication.
    Since you can run php, mysql, curl and pretty much anything with it, it works fine with the API!
    I would suggest to simply install XAmpp, it contains several tools like Apache and SQL.
    Werner der Champ German CoC Wiki Admin (Link)
    My Ideas:Matchmaking fix for Legends|Cat troop idea|Ultimate Clash Royale Tournament idea
    Quote Originally Posted by WernerderChamp View Post
    Are you again waiting till 100,000,000 total clicks on "Try again" ?

    Quote Originally Posted by Stitch View Post
    Yes. Please hurry up with the final 10,000 taps!


  5. #15
    Junior Member
    Join Date
    Oct 2015
    Posts
    52
    Thank you WernerDerChamp for the typo correction =)

    I was only recommending WAMP because I tried in the past exploiting data linking tables into MS Access as Deedolith was asking at first.
    There is probably a solution for that using XAMPP too.

    After WAMP, LAMP, XAMPP, ... free to pick one, the objective is to be able to run server code (for instance php) on your machine.

  6. #16
    Junior Member
    Join Date
    May 2016
    Posts
    94
    Well, I'm trying to understand how the API work, and to be honest, setting up a web server as a bridge between an app and the API looks overkill.

  7. #17
    Junior Member
    Join Date
    Oct 2015
    Posts
    52
    Forget about the "web server", it's not so clear what you want to achieve and what tools you want to use to do so.

    2 points are for sure
    - You need to know your ip address to create a key a be allowed to query the API.
    - You need to create one or several scripts to perform the query(ies) to the API (once you have a working key).

    after there is the question about what you do with these information,
    if you just want to display what you obtained from the query, you do not need a database to store the information.
    if want to create a daily checkpoint or weekly progress than you will need to have a database to store the results of your queries and display them when your app asks for it.

    The language you pick to realize those queries is up to you, as long as they are able to do so, if you are familiar with a language and want to work with it, ask google if possible to work with JSON, API.. open a few answers and you will for sure get your reply.

Posting Permissions

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