APIs & Integrations

MikeTeave
Member

Files API (V3) : after is not working as expected in query parameters

I have been Hubspot Files api (v3) since months and using "after" to paginate to next page in responses - It was working fine but now when I use "after" we are getting empty results in response. I think there is some issue in API can you suggest any solutions?

0 Upvotes
btara
Member

Files API (V3) : after is not working as expected in query parameters

I have understood your problem but I am a little bit confused in giving answer of your question. I want to know that on which browser your API files does not work properly. While I am using GB WhatsApp then I am also fcing similar problem.

0 Upvotes
btara
Member

Files API (V3) : after is not working as expected in query parameters

I am also faced the similar problem with telecombit.com but have solved out. You can also change it through API integration settings.

0 Upvotes
btara
Member

Files API (V3) : after is not working as expected in query parameters

I am also faced the similar problem with telecombit.com but have solved out. You can also do it by changing with this code.

public any function getPost(required numeric postId, string order)
{
    switch(arguments.order)
    {
        case "new":
            arguments.order = "posts.createdAt DESC";
            break;
        case "old": 
            arguments.order = "posts.createdAt ASC";
            break;
        default:
            arguments.order = "posts.score DESC";
    }

    local.post = new Query(dataSource=variables.wheels.class.connection.datasource);
    local.post.setSql("
        SELECT *
        FROM
        WHERE posts.id = :postId OR posts.parentId = :postId
        ORDER BY posts.postTypeId ASC, :order"
    );

    local.post.addParam(name="postId", cfsqltype="cf_sql_integer", value=arguments.postId, maxlength=10);
    local.post.addParam(name="order", cfsqltype="cf_sql_varchar", value=arguments.order, maxlength=20);
    local.post = local.post.execute().getResult();

    return local.post;

 

0 Upvotes