Help missing for endpoint?

Started by ChrisPlak, March 12, 2021, 04:16:36 AM

Previous topic - Next topic

ChrisPlak

Hi there.  I'm not sure if I'm just missing something obvious.

I am attempting to write an app and need a global variable.  I went to the sample "Application Variables".  Running that app says it uses the "/appvar endpoint". 

I want to find help on appvar.  I launched the "IMWS DevDocs" and it is not found in there.  I tried typing "appvar" and "/appvar".  Nothing is returned.  I then searched through these help forums and your iMatch Documentation developer site.  I can find nothing on the appvar endpoint.

Where does this info/help exist? 

(BTW, I'm brand new to this new way of writing apps.  I had used the basic interface you had up to V5.  If I'm missing something obvious here, be easy on me).

Mario

This is not an IMatch WebServices endpoint (IMWS) but an endpoint provided by IMatch. These endpoints are not available in the IMWS documentation.
See the sample app "Application Variables" for details on how to use this IMatch endpoint. If you don't see the sample apps in the App Manager, go to Edit > Preferences and enable the developer mode option. appvar is a rarely used endpoint and hence there is no pre-made method in the IMatchLib helper library for it.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ChrisPlak

Thanks.

I'm new to this world of web programming.  I have a bazillion years of professional and person C, assembly language, SQL, PL/SQL, and other languages programming.  All of this web stuff is new to me and very foreign.. Maybe the answer will eventually be obvious, but today it is not.

I'm actually surprised people wouldn't use /appvar, although I switched to using v1/data because it was documented and I liked using something stuffed hidden away from the user (me). 

I would imagine people would use the /v1/categories endpoint quite a bit.  I can't find documentation on that endpoint.  While I realize from your reply that this would not be in the IMWS help app (because it is iMatch and not IMWS) shouldn't it be on the developers documentation site?  Is there an iMatch endpoint documentation site?  Is there a need for one?

I guess what I'm getting at, and I apologize if there is an obvious answer, what is the process of figuring out how to call an endpoint and what the expected return results are?  The sample apps have been a HUGE help as has your tutorial page, and this is mostly what I am using.  Is that the normal thing that people do in web development?


And an aside.  You have an awesome product in iMatch.  I love it.  Been using it (and upgrading it) for about 10+ years now.  Does everything and more than I could ever want/need.  I can't imagine the amount of time you put into it.  Just wanted to say thanks for such an awesome app.

Mario

There are only a few users who write apps. Very few.
Many of the features for which users wrote apps in the past has been integrated into IMatch over the years.
Many of the new generation users starting to use IMatch these days have never learned programming.

All frequently used endpoints are documented, including v1/categories. See screen shot below. Just search for categories in the IMWS doc to find it.
A lof of "how to use this" is included in the open source sample apps I have provided.
What an endpoint returns can be seen in the developer tools of your web browser (in the Preview tab, usually) and also in the JavaScript debugger in your browser or in your JavaScript IDE (Visual Studio Code - free and highly recommended).

It just makes not much sense for me to maintain extensive and detailed documentation + helper libraries for maybe a handful of users who write one or two apps for their very specific purposes.
I'm just one man and I need to prioritize where to put work in. And that is clearly into things which bring IMatch forward and add features beneficial for the majority of users.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ChrisPlak

Thanks for your response.

I agree that it is not worth the time and effort.  I am one of those doing one off apps that just serve a specific need I have.  And once I finish converting my basic apps to javascript, that will probably be it for quite some time.

dcb

Quote from: Mario on March 12, 2021, 08:34:27 AMThis is not an IMatch WebServices endpoint (IMWS) but an endpoint provided by IMatch. These endpoints are not available in the IMWS documentation.
See the sample app "Application Variables" for details on how to use this IMatch endpoint. If you don't see the sample apps in the App Manager, go to Edit > Preferences and enable the developer mode option. appvar is a rarely used endpoint and hence there is no pre-made method in the IMatchLib helper library for it.
I know this is an old thread, but I've come here looking for how to access application variables. Rather than keys and secrets in scripts (which I will upload to Github once more robust), I'd like to use application variables eg. {Application.Variables.flickr_apikey}

I cannot find the Application Variables app in webroot/* folder the with 2023.7.2, nor even a Developer mode to activate.

The /appvar endpoint sounds like it's what I need.
Have you backed up your photos today?

Jingo

If you mean storing and retrieving keys from the IMatch database.. then, check out the IMWS.dataGet/IMWS.dataSet functions... these are what I use in my apps to store and retrieve API key data without hardcoding them in text files, etc.

Mario

#7
Check out the globalvars sample app (C:\ProgramData\photools.com\IMatch6\webroot\imatch\samples\globalvars\index.html) which shows how to load, read and write application variables.

It uses v1/imatch/appvar/list to list all variables and v1/imatch/appvar to get/set variable values.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

dcb

Thanks Mario. That's great and I have it working in Python easily enough.
Have you backed up your photos today?