Skip to content
TORNLIFE More

striptags not working (V2)

Started by Perturbae [2329817] on in API Development.

3 replies · 63 views · thread synced · 4 days ago · View on torn.com
About this thread

Posts archived: 4 / 4 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
4
Discussion span
→
People posting
3
Likes on archived posts
2
Posts by staff, officers and moderators
2
Authority score
72 / 100
Historical score
31 / 100
Story score
25 / 100
Engagement score
44 / 100

Most-liked replies

Perturbae [2329817]

I have been struggling with the striptags and no matter what I do, they're not stripped.

 

Usage:

https://api.torn.com/v2/user?selections=profile&id=User_ID&striptags=true

 

When looking at the data in Profile.Status I still see tags:

  "status": {
    "description": "In hospital for 2 hrs 11 mins ",
    "details": "Hospitalized by Perturbae",
    "state": "Hospital",
    "color": "red",
    "until": 1752746436
  },

 

Am I doing something wrong or is this just not working?

splent [2088243] Admin Staff

Hey,

 

This selection is not yet refactored in API v2 - it's returning the API v1 response.

Unfortunately, the API v1 doesn't support the striptags parameter, so that's why it's not working.

It will be working when I refactor this selection in API v2 though.

JorkinDaniel [3359537]

follow-up question to this; is [scriptags] available for all API v2 selections, not just /faction/members? If so, that would be an absolute boon for my filtering as I:
1) wouldn't have to store so many strings in RAM

2) woudln't have to use godawful regex to extract names

splent [2088243] Admin Staff

For the relevant v2 selections that were already refactored yeah - such as ‘faction’ -> ‘news’, forum related ones, revives related and a few more.

 

If you do notice a selection that should have that (in v2) but it doesn’t, please do let me know so I can add it.

 

All other v2 selections that I’ll refactor in the future will also have this functionality.