Opened 11 years ago

Last modified 8 years ago

#3276 assigned Enhancement

Make the RPC arguments' naming scheme internally consistent

Reported by: Longinus00 Owned by: charles
Priority: Low Milestone: Sometime
Component: Transmission Version: 1.93
Severity: Normal Keywords:


The rpc keys are a mix of camel case and hyphen delimited strings. Of the session arguments, however, only seedRatioLimit and seedRatioLimited are camel cased. Maybe they should be dropped for the pref keys ratio-limit and ratio-limit-enabled?

This should allow a 1 to 1 correspondence between session rpc arguments and their requisite settings.json pref keys. It's probably not worth messing with the torrent arguments because it's such a mess.

Change History (5)

comment:1 Changed 11 years ago by charles

  • Owner set to charles
  • Status changed from new to assigned

comment:2 Changed 11 years ago by Longinus00

#3299 is also a direct result of a rpc/pref inconsistency (string vs. enum) and should also be addressed by this ticket.

comment:3 Changed 11 years ago by charles

  • Milestone changed from 2.10 to Sometime
  • Summary changed from Session rpc arguments seedRatioLimit and seedRatioLimited are inconsistent to Make the RPC arguments' naming scheme internally consistent

Looking over this again, it's less clear to me that changing these arguments is an improvement. It would add consistency between the session arguments, but it would lose consistency between torrent-{get,set}'s seedRatioLimit and seedRatioMode arguments. And, yes, torrent-{get,set} is a mess.

If we're going to make changes like this, we should probably take the time to make *all* the arguments consistent all at once. The fewer releases we spread these API changes across, the less headache we'll cause for the RPC clients out there.

Edit: I don't feel very strongly about this either way, which is probably why I waffle back and forth on the topic. Part of me is annoyed by the inconsistencies, but another part feels that it's indulgent to scratch such a marginal itch when we have so many third party apps relying on the RPC interface.

Last edited 11 years ago by charles (previous) (diff)

comment:4 Changed 11 years ago by charles

  • Priority changed from Normal to Low

comment:5 Changed 8 years ago by killemov

Still new attributes are added in both hyphen-ated and camelCased formats. Make it a policy to only add new attributes in camelCase.

Note: See TracTickets for help on using tickets.