Skip to main content
added 89 characters in body; edited tags
Source Link
Cerbrus
  • 331
  • 1
  • 7

Documentation or API method for `option_id` information, for the `/flags/options` API calls?

The Stack Exchange API has a couple of calls that return a list of flag_option objects.

These objects contain a couple of properties that can be used to identify the flag you need.
For example, when I want to cast a spamspam flag from an app, I used to look for a flag option with an title equal to "spam":

{"has_flagged":false,"option_id":46534,"title":"spam"},

This approach went down the drain when a user tried to cast a flag on a non-English SE site, since their flag options look a little different:

{"has_flagged":false,"option_id":46534,"title":"contenido no deseado"},

Now, the option_id is something else I can identify the proper option from, but these aren't documented anywhere (that I know of).

I'd rather not rely on my own interpretation of these ids from a couple of API calls, since mistakes in flagging just aren't acceptable.


TL;DR: CanTL;DR: Can these option_ids be documented on the flag_options page, or in an answer here?

Even these option_ids be documented on the flag_options pageflag Ids aren't stable, or in an answer here?and could change at any time.


Feature Request:

Please add an API route that tells me what option_id is used for what type of flag, for a specific site. (Where "type of flag" is a constant):

A call that'd return something like this:

{
    site: 'siteName',
    flag_options:{
        spam: x,
        rude_abusive: y,
        not_an_answer: z,
        <...>
    }
}

Documentation for `option_id`, for the `/flags/options` API calls?

The Stack Exchange API has a couple of calls that return a list of flag_option objects.

These objects contain a couple of properties that can be used to identify the flag you need.
For example, when I want to cast a spam flag from an app, I used to look for a flag option with an title equal to "spam":

{"has_flagged":false,"option_id":46534,"title":"spam"},

This approach went down the drain when a user tried to cast a flag on a non-English SE site, since their flag options look a little different:

{"has_flagged":false,"option_id":46534,"title":"contenido no deseado"},

Now, the option_id is something else I can identify the proper option from, but these aren't documented anywhere (that I know of).

I'd rather not rely on my own interpretation of these ids from a couple of API calls, since mistakes in flagging just aren't acceptable.


TL;DR: Can these option_ids be documented on the flag_options page, or in an answer here?


Feature Request:

Please add an API route that tells me what option_id is used for what type of flag, for a specific site. (Where "type of flag" is a constant):

A call that'd return something like this:

{
    site: 'siteName',
    flag_options:{
        spam: x,
        rude_abusive: y,
        not_an_answer: z,
        <...>
    }
}

Documentation or API method for `option_id` information, for the `/flags/options` API calls?

The Stack Exchange API has a couple of calls that return a list of flag_option objects.

These objects contain a couple of properties that can be used to identify the flag you need.
For example, when I want to cast a spam flag from an app, I used to look for a flag option with an title equal to "spam":

{"has_flagged":false,"option_id":46534,"title":"spam"},

This approach went down the drain when a user tried to cast a flag on a non-English SE site, since their flag options look a little different:

{"has_flagged":false,"option_id":46534,"title":"contenido no deseado"},

Now, the option_id is something else I can identify the proper option from, but these aren't documented anywhere (that I know of).

I'd rather not rely on my own interpretation of these ids from a couple of API calls, since mistakes in flagging just aren't acceptable.


TL;DR: Can these option_ids be documented on the flag_options page, or in an answer here?

Even these flag Ids aren't stable, and could change at any time.


Feature Request:

Please add an API route that tells me what option_id is used for what type of flag, for a specific site. (Where "type of flag" is a constant):

A call that'd return something like this:

{
    site: 'siteName',
    flag_options:{
        spam: x,
        rude_abusive: y,
        not_an_answer: z,
        <...>
    }
}
Cerbrus, if you don't like, revert this edit.
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64

The Stack Exchange API has a couple of calls that return a list of flag_option objects.

These objects contain a couple of properties that can be used to identify the flag you need.
For example, when I want to cast a spam flag from an app, I used to look for a flag option with an title equal to "spam":

{"has_flagged":false,"option_id":46534,"title":"spam"},

This approach went down the drain when a user tried to cast a flag on a non-English SE site, since their flag options look a little different:

{"has_flagged":false,"option_id":46534,"title":"contenido no deseado"},

Now, the option_id is something else I can identify the proper option from, but these aren't documented anywhere (that I know of).

I'd rather not rely on my own interpretation of these ids from a couple of API calls, since mistakes in flagging just aren't acceptable.


TL;DR: Can these option_ids be documented on the flag_options page, or in an answer here?


Feature Request:

Another option would be to exposePlease add an API callroute that tells me what option_id is used for what type of flag, for a specific site. (Where "type of flag" is a constant):

A call that'd return something like this:

{
    site: 'siteName',
    flag_options:{
        spam: x,
        rude_abusive: y,
        not_an_answer: z,
        <...>
    }
}

The Stack Exchange API has a couple of calls that return a list of flag_option objects.

These objects contain a couple of properties that can be used to identify the flag you need.
For example, when I want to cast a spam flag from an app, I used to look for a flag option with an title equal to "spam":

{"has_flagged":false,"option_id":46534,"title":"spam"},

This approach went down the drain when a user tried to cast a flag on a non-English SE site, since their flag options look a little different:

{"has_flagged":false,"option_id":46534,"title":"contenido no deseado"},

Now, the option_id is something else I can identify the proper option from, but these aren't documented anywhere (that I know of).

I'd rather not rely on my own interpretation of these ids from a couple of API calls, since mistakes in flagging just aren't acceptable.


TL;DR: Can these option_ids be documented on the flag_options page, or in an answer here?


Another option would be to expose an API call that tells me what option_id is used for what type of flag, for a specific site. (Where "type of flag" is a constant):

A call that'd return something like this:

{
    site: 'siteName',
    flag_options:{
        spam: x,
        rude_abusive: y,
        not_an_answer: z,
        <...>
    }
}

The Stack Exchange API has a couple of calls that return a list of flag_option objects.

These objects contain a couple of properties that can be used to identify the flag you need.
For example, when I want to cast a spam flag from an app, I used to look for a flag option with an title equal to "spam":

{"has_flagged":false,"option_id":46534,"title":"spam"},

This approach went down the drain when a user tried to cast a flag on a non-English SE site, since their flag options look a little different:

{"has_flagged":false,"option_id":46534,"title":"contenido no deseado"},

Now, the option_id is something else I can identify the proper option from, but these aren't documented anywhere (that I know of).

I'd rather not rely on my own interpretation of these ids from a couple of API calls, since mistakes in flagging just aren't acceptable.


TL;DR: Can these option_ids be documented on the flag_options page, or in an answer here?


Feature Request:

Please add an API route that tells me what option_id is used for what type of flag, for a specific site. (Where "type of flag" is a constant):

A call that'd return something like this:

{
    site: 'siteName',
    flag_options:{
        spam: x,
        rude_abusive: y,
        not_an_answer: z,
        <...>
    }
}
edited tags
Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64
Post Migrated Here from meta.stackexchange.com (revisions)
Source Link
Cerbrus
  • 331
  • 1
  • 7
Loading