GithubHelp home page GithubHelp logo

24u / fmrestor.php Goto Github PK

View Code? Open in Web Editor NEW
10.0 4.0 6.0 177 KB

Leverage the FileMaker® 17, 18, 19 & 20 Data API with ease!

Home Page: https://www.24usoftware.com/fmRESTor

License: GNU Lesser General Public License v3.0

PHP 100.00%
filemaker-api filemaker php filemaker17 api filemaker-dataapi filemaker-database filemaker-databases filemaker18 filemaker-18-api filemaker-17-api filemaker-server filemaker19 filemaker-19-api filemaker-20-api filemaker20

fmrestor.php's People

Contributors

filip24u avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fmrestor.php's Issues

Typo in fmDateSource

Hello HOnza,

Pretty sure there's a typo, 'fmDateSource' is referenced 4 times and I think it was meant to be 'fmDataSource'. Code works fine but is a little confusing.

-- Micah

PHP 8 Support

Is it possible to release a php 8 version of the fmRESTor library?

Errors after updating to FMS 19.4.2

All requests utilizing fmRESTor are returning this error message after a recent update to FMS 19.4.2.
This update included the manual installation of PHP on that server to run webhook scripts. This install followed Claris's official guide: https://support.claris.com/s/article/PHP-bundling-deprecation-and-removal-from-FileMaker-Server?language=en_US

HTTP/2 stream 0 was not closed cleanly: Unknown error code (err 1)

Research shows that you need to force cURL to use HTTP 1:
curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);

However, since fmRESTor is bundled, there should be a setting to allow toggle of this.

Perhaps something like:
`$options = array(
"sessionName" => "fm-api-token",
"tokenExpireTime" => 5,
"allowInsecure" => true,
"http" => 1.1
);

$fm = new fmRESTor("127.0.0.1", "DB", "layout", "user", "pass", $options);`

bug with fmDataSource

When moving a database from a Filemaker Server 17 to v19, scripts that used fmRESTor stopped working.

I am getting the error:
'fmDataSource': Expected type array but found type string

It looks like the fmRESTor login function is sending:
{"fmDataSource":""}

The troublesome code seems to be here:

        if ($this->fmDataSource !== null) {
            $prepareParam = array(
                "fmDataSource" => $this->fmDataSource
            );

            $param = $this->convertParametersToJson($prepareParam);
        }

When I comment out this portion of the code, the error goes away. (My reading of the documentation seems to indicate fmDataSource is for connecting to external data sources, which I am not doing)

Sort order issue in example

"surname" => "Neal", "sortOrder" => "ascend"

This shows something like this on line 20:
"surname" => "Neal", "sortOrder" => "ascend"

It looks like a find request in sort order. I think it should be something like:
"fieldName" => "surname", "sortOrder" => "ascend"

Hope this helps.

Support for oAuth

It does not look like it's possible to use fmRESTor with an oAuthRequestId and oAuthIdentifier for authentication. Unless I'm missing something, any time you access the fmRESTor class you must pass in the username and password. Using https://github.com/ClickWorks/FMDataAPIOAuthConnector I am able to authenticate using oAuth but once I receive the token in the response I don't see how to use it with fmRESTor.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.