Empty fields

Hello!

It looks like the API doesn’t return a resource’s empty fields. For example, the hash one gets upon retrieving a contact which doesn’t have an email address lacks an “email” key.

Would it be feasible to always return all the fields?

I ask because I’m writing a client and I had been hoping to auto-discover a resource’s fields from the API’s responses. Unless the API always returns all the fields, I’ll have to define every resource’s fields up front. Oh, the horror.

Thanks in advance,

Andy Stewart

Hi Andrew,

I agree that it’s not ideal that empty fields are omitted. I’m afraid
that’s not something we’re likely to fix in the short term.

Kind regards,

GraemeOn 19 November 2013 12:05, Andrew Stewart boss@airbladesoftware.com wrote:

Hello!

It looks like the API doesn’t return a resource’s empty fields. For
example, the hash one gets upon retrieving a contact which doesn’t have an
email address lacks an “email” key.

Would it be feasible to always return all the fields?

I ask because I’m writing a client and I had been hoping to auto-discover
a resource’s fields from the API’s responses. Unless the API always
returns all the fields, I’ll have to define every resource’s fields up
front. Oh, the horror.

Thanks in advance,

Andy Stewart


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Graeme Boyd
Senior Software Engineer

Web. freeagent.com http://www.freeagent.com/ Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent Facebook.
facebook.com/freeagentapp

40 Torphichen Street, Edinburgh, EH3 8JB
FreeAgent Central Ltd. Registered in sunny Scotland SC316774

I thought it was the norm for apis? Why send more data than you need to?!On 19 November 2013 16:45, Graeme Boyd graeme@freeagent.com wrote:

Hi Andrew,

I agree that it’s not ideal that empty fields are omitted. I’m afraid
that’s not something we’re likely to fix in the short term.

Kind regards,

Graeme

On 19 November 2013 12:05, Andrew Stewart boss@airbladesoftware.comwrote:

Hello!

It looks like the API doesn’t return a resource’s empty fields. For
example, the hash one gets upon retrieving a contact which doesn’t have an
email address lacks an “email” key.

Would it be feasible to always return all the fields?

I ask because I’m writing a client and I had been hoping to auto-discover
a resource’s fields from the API’s responses. Unless the API always
returns all the fields, I’ll have to define every resource’s fields up
front. Oh, the horror.

Thanks in advance,

Andy Stewart


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


Graeme Boyd
Senior Software Engineer

Web. freeagent.com http://www.freeagent.com/ Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent Facebook.
facebook.com/freeagentapp

40 Torphichen Street, Edinburgh, EH3 8JB
FreeAgent Central Ltd. Registered in sunny Scotland SC316774


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf |
@wastesourcehttps://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use of
the addressee/s. Access, copying, disclosure or re-use, in any way, of the
contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.

Hi Graeme,

No worries. Thanks for the info.

Cheers,
AndyOn 19 Nov 2013, at 17:45, Graeme Boyd graeme@freeagent.com wrote:

Hi Andrew,

I agree that it’s not ideal that empty fields are omitted. I’m afraid that’s not something we’re likely to fix in the short term.

Kind regards,

Graeme