Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


IElite last won the day on December 18 2018

IElite had the most liked content!

About IElite

  • Rank

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Interests
    FreePascal, Delphi, Smart Mobile Studio


  • Company name
    Cold River Labs
  • Sector
    Information technology
  • Position

Smart Mobile Studio

  • Edition

Recent Profile Visitors

4,127 profile views
  1. IElite

    RoadMap 2019

    @jarto Myself, I am more interested in examples of client/server related projects (e.g. writing SMS clients for mobile devices which talk to node.js server).
  2. IElite

    RTL Search

    I use a free version of FileSeek
  3. IElite

    css styling

    Thanks, that did explain it better. Thanks for taking the time. I am interested in examining it further for sure.
  4. IElite

    css styling

    Im confused as well...I see nothing related to a 'card'
  5. IElite

    RoadMap 2019

    I just want to see more documentation and examples geared towards mobile devices.....i mean, it is called Smart Mobile Studio
  6. IElite

    Font size and style in buttons

    Suggestion 2
  7. IElite

    How to resize a modal dialog

    Try capturing the orientation change explicitly and then calling the modal forms resize event within it function window: variant; external 'window' property; procedure TModalForm.InitializeObject; begin inherited;  {$I 'ModlForm:impl'} window.addEventListener('devicemotion', @Resize, false);  end;  procedure TModalForm.Resize; begin inherited; // your resize code here end;
  8. IElite

    Wrapping javascript library or ASM blocks ?

    oh shoot, i dont know why, but it is working now...hmmmm Thanks for all your help @lynkfs
  9. IElite

    Wrapping javascript library or ASM blocks ?

    Seems like what i posted in my last post, works as well...i.e., using my api unit The issue was with the first section of code and the token I guess I assumed you had to login first, and get the token, and then use the token to get the Client object ???? like this: var loginClient = new JSONRpcClient({ 'url': 'https://user-api.simplybook.me' + '/login', 'onerror': function (error) {}, }); var token = loginClient.getToken('ACME', '88e24ae6c5cb30d9205ffc05b.........d189fefc8d09eb64752d5433994d0'); is that not correct? It looks like you hardcoded the token ? i was assigning that token variable instead like @client = new JSONRpcClient({ 'url': '//user-api.simplybook.me', 'headers': { 'X-Company-Login': 'Acme', 'X-Token': token }, 'onerror': function (error) { alert(error); } });
  10. IElite

    Wrapping javascript library or ASM blocks ?

    hmm, ok i will give your code a try. I added theose to javascript files to my project and then added them to a unit called api unit api; interface {$R "jquery-3.3.1.js"} {$R "json-rpc-client.js"} and then included the api unit in my main form
  11. IElite

    Wrapping javascript library or ASM blocks ?

    Thanks, You can look at their API explorer page, which lets you walk through the steps live https://simplybook.me/api/developer-api/tab/explorer_api
  12. IElite

    Wrapping javascript library or ASM blocks ?

    I see to still be having trouble with that last line var EventList: variant := client.getEventList(-params-); in their example online, you do not have to pass params, they are optional var client = new JSONRpcClient({ 'url': '//user-api.simplybook.me', 'headers': { 'X-Company-Login': '{companyLogin}', 'X-Token': '{token}' }, 'onerror': function (error) { alert(error); } }); var events = client.getEventList(); I have this code outside my asm block writeln('ok'); var EventList: variant := client.getEventList(); writeln('ok'); the first OK is written, but the second is not The EventList should be filled with a large block of JSON e.g. { "1": { "id": "1", "name": "Часовая фотосесcия", "duration": "60", "buffertime_before": "0", "buffertime_after": "0", "hide_duration": "0", "description": "Если Вы хотите попробовать себя в роли модели, но не определились с образом. 10 отретушированных и готовых к печати фотографий + отснятый материал на диске", "picture": "03661dd2903a3b3707807e30676821ae.jpg", "is_public": "1", "is_active": "1", "position": "0", "file_id": "1", "seo_url": null, "is_recurring": "0", "picture_sub_path": "/image_files", "is_visible": "1", "picture_path": "/uploads/mib/image_files/preview/03661dd2903a3b3707807e30676821ae.jpg", "unit_map": { "1": null }, "classes_plugin_info": { "unit_group_binded_in_class": null, "unit_groups_binded_in_classes": [] } }, ...................................................................................... } }
  13. I am trying to use the API of the following website The API uses JSON-RPC 2.0 protocol. The API documentation is here They also provide a javascript library If I utilize this library in my SMS project, I can make the calls and get it to work, utlizing ASM block asm var loginClient = new JSONRpcClient({ 'url': 'https://user-api.simplybook.me' + '/login', 'onerror': function (error) {}, }); var token = loginClient.getToken('ACME', '88e24ae6c5cb30d9205ffc05b490daef8ddd189fefc'); var client = new JSONRpcClient({ 'url': '//user-api.simplybook.me', 'headers': { 'X-Company-Login': 'ACME', 'X-Token': token }, 'onerror': function (error) { alert(error); } }); console.log(JSON.stringify(client)); end; However, I am wondering if it is possible to create a Smart Pascal wrapper for this unit, so that I can call these in pascal and not have to worry about jumping back and forth between ASM block and pascal blocks of code? If so, can some one provide me an example of one of these? Are these two the only thing needing wrapper for? var JSONRpcClientException = function (code, message) { this.code = code; this.message = message; } var JSONRpcClient = function (options) { this.setOptions(options); this.init(); } Thanks
  14. IElite

    Endpoints & Resources ?

    OH OK, Thanks for your help!
  15. IElite

    Endpoints & Resources ?

    @lynkfs thanks, I see how you showed how to parse the Url and handle each case. thanks! not sure I am understanding how data works? I am getting "Content: undefined" in my browser. Can you tell me how the data variant is used?