Acessing client WiKi embedded files

How do I get the WiKi page Guid for a particular client and then how do I access the embedded files within a WiKi page?

I’m working on a stand alone application. I’m trying to access an embedded file associated with a client’s WiKi page.

I’ve used the AyaNova C# API example as a starting point.

I’ve only done simple coding to this point, just to become familiar with the different classes in the API.

I’ve been able to create a list of all available clients using the ClientPickList class. From this list I use the client Guid ID number to access a specific client using the Client class.

I’m not able to use the Client Guid ID number to access its WiKi page and I don’t see a WiKiPickList class like I use to access my client.

How do I get the WiKi page Guid for a particular client and then how do I access the embedded files within a WiKi page?

Any help is appreciated.

GLENN_OVIS (11/24/2009)How do I get the WiKi page Guid for a particular client and then how do I access the embedded files within a WiKi page?

I’m working on a stand alone application. I’m trying to access an embedded file associated with a client’s WiKi page.

I’ve used the AyaNova C# API example as a starting point.

I’ve only done simple coding to this point, just to become familiar with the different classes in the API.

I’ve been able to create a list of all available clients using the ClientPickList class. From this list I use the client Guid ID number to access a specific client using the Client class.

I’m not able to use the Client Guid ID number to access its WiKi page and I don’t see a WiKiPickList class like I use to access my client.

How do I get the WiKi page Guid for a particular client and then how do I access the embedded files within a WiKi page?

Any help is appreciated.

Hi Glenn to get a wiki page for a client use this:

WikiPage wp=WikiPage.GetItem(RootObjectTypes.Client, ClientGuid);//Where clientguid is the client id in question

To get a list of files use the AyaFileList object:

AyaFileList fl = AyaFileList.GetList(wp.ID);//where wp is the wikipage id

Cheers!

  • John

Whups, sorry Glenn, didn’t realize it uses a type and id object so this is the correct form:

WikiPage wp = WikiPage.GetItem(new TypeAndID(RootObjectTypes.Client, ClientID));

Also the content is available as RTF, plain text or html. (it’s natively stored in RTF)

See the reference for WikiPage class in the api docs: http://api.ayanova.com/

John

The Class “WiKi”, method “GetItem” is looking for one argument of type “TypeAndID”. ie GetItem(TypeAndID) or GetItem(Guid for WiKi)

The line WikiPage wp=WikiPage.GetItem(RootObjectTypes.Client, ClientGuid); give an error of “There are No overload for method, ‘GetItem’ that takes 2 arguments”.

Have I missed something?

Glenn

John

I missed you corrected post. Everything working fine now.

Thanks

Glenn

Good to hear, sorry about that I was going off the top of my head, forgot to check the api docs.

Cheers!