Ticket #849 (closed task: duplicate)

Opened 12 years ago

Last modified 11 years ago

[M] CSML3 API requests (1)

Reported by: lawrence Owned by: domlowe
Priority: blocker Milestone: Reporting
Component: CSML Version:
Keywords: CSML3 Cc: awoolf

Description (last modified by lawrence) (diff)

The CSML API isn't very pythonic, and the distinction between attributes and methods (affordances) is not obvious. Introspection ought to help us, but doesn't a lot.

For example, if we introspect the attributes and methods of a feature member within a feature collection: (see ticket:848 for how we can get to this), we have a feature collection which is nearly iterable, so we can do this:

for i in dd.featureMembers: i.id

and get a list that looks something like

'K2xpDJkh'
'QFE4YVaJ'
'SEgLDf6Z'
...

but I can't look at ddK2xpDJkh? which is what one expects to be able to do ...

Further, if I do try and look at the objects with dir() I can't immediately tell what are attributes (like a FeatureCollection? is an attribute of a datset, yet there is an attribute called getFeatureCollection ...), and what are methods (like subsetting).

Obviously this is something to talk about after NDG2.

Change History

comment:1 Changed 12 years ago by lawrence

  • Description modified (diff)

comment:2 Changed 12 years ago by domlowe

  • Status changed from new to assigned

Agreed, and it's confused/ing because it's trying to be XML-like at the same time..

Is this a blocker for now?

comment:3 Changed 12 years ago by selatham

  • Component changed from T01_Discovery to T02_CSML

comment:4 Changed 12 years ago by selatham

CSML future (but where?)

comment:5 Changed 11 years ago by domlowe

  • Status changed from assigned to closed
  • Resolution set to duplicate

Moved to CSML Trac  ticket:2

Note: See TracTickets for help on using tickets.