Announcement

Collapse
No announcement yet.

Purpose of GetMatch and what are the parameters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Purpose of GetMatch and what are the parameters

    Can someone shed some light what GetMatch is supposed to do, when called and what should be returned?

    I see a QueryData and ResponseData part as part of the parameter. However, QueryData seems to be empty and ResponseData seems to have some info.

    Any info on this topic (and added to the SDK API) would be very helpful.

    Thanks

    Dirk

    #2
    And is it actually used by HSTouch? If HSTouch is not using it do we really need to implement it (same applies to multiple other APIs)?

    Comment


      #3
      Wade should chime in with info on this call, he added it for the Spotify plugin. We put the Spotify plugin on hold for now due to issues with their API.

      The changes for it were put in the Windows client, but not the other clients. There are some new actions that allow you to enter search info into a textbox then set the action to do the search. Wade knows what functions it actually calls and he has a project for the Designer that tests it.

      Note that I will be traveling next week so might not be very responsive to questions.

      Originally posted by pcp View Post
      And is it actually used by HSTouch? If HSTouch is not using it do we really need to implement it (same applies to multiple other APIs)?
      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

      Comment


        #4
        GetMatch was new functionality for HSTouch.

        The idea was to get away from having a list of functions and consolidate down to a single function with parameters.

        With it you might search using multiple keywords from multiple types

        eg: search on by year:1960,1963 and genres: Rock, Blues, and you want to get back: Album,Artist



        The function is passed a query object.

        The query_object object consists of an array of query data objects, and an array of types of data you would like returned.

        The query_data object contains an array of data to search by, the type of data it is, whether you want an exact match on the data, and whether the data is a range.

        The responsedata array is a list of the types of data you would want returned, in the order you provided.

        So, in the example, you would have a query object, and in it you would have two query_data objects(one for the year, and one for the genre), and two response types (Album, Artist).

        The first query_data object would have two pieces of data(1960,1963), the data type (year), is exact match(true), and is range (false).

        The second query_data object would have two pieces of data(Rock,Blues), the data type (genre), is exact match(true), and is range (false).

        The responsedata array would have two items for Album and Artist.




        The function returns a response object.

        The response object contains an array of response data objects, and an array of types of data that each response data object contains.

        A response data object has one main piece of data (title), the ID for that item (if available), along with the additional data set by the types of data in the DataTypes array.

        So, when the data is returned, there should be an array of response data, and an array of response types(Album, Artist)
        (we send back the array of data types we sent so we don't have to worry about keeping track on the server side).

        Each response_data object in the array would have The Album as its main data, and the Artist in the additional info.

        When the response is received, you would look at the datatypes array to see what was sent back in each response_data object, and in what order.

        So, you searched for Albums from the year 1960 and 1963, in the genre of Rock, and Blues.
        You would also like the Artist for the Album being returned.

        Say you found 4 items (4 albums found? what a crummy music catalog!), 2 from the Beatles, 1 from Elvis, and 1 from The Who.

        You would have 4 response_data records in the array, each would have the name of the album in the title property, and the name of the band in the additional info.


        It's up to you if you wish to use it, as it was new, but with the number of functions needed to handle all the possibilities that can be passed, I would recommend considering it.
        Wade

        "I know nothing... nothing!"

        Comment

        Working...
        X