Method parameters
Returns all the available lists
- string GetLists(stringaccessKey)
- accessKey: access key obtained using the Login method
If error code=0, the message will contain the IDs of all the accessible lists.
Sample GetLists request
GetLists request
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ws="http://services.mailupnet.it/WS"> <soap:Header/> <soap:Body> <ws:GetLists> <ws:accessKey>HzAgwRRJaAKBtkgNWpkAuURfV4SxMm6T3HJegRuSkUivKJElNNcmSQe8nqGyoM9S8EyQZb6ZE2shjHWIN4f5xYBJx9u</ws:accessKey> </ws:GetLists> </soap:Body> </soap:Envelope>
Sample GetLists response
<GetListsResult> <errorCode>0</errorCode> <errorDescription></errorDescription> <lists> <list> <listID>1</listID> <listName>Lista nr.1</listName> </list> <list> <listID>2</listID> <listName>Lista nr.2</listName> </list> </lists> </GetListsResult>
Ruby Example
# Refer to https://mailup.atlassian.net/wiki/display/mailupapi/MailUp+RubyGem for gem information. require 'mailup' m = MailUp::Send.new('username', 'password') m.get_lists # => "<GetListsResult><errorCode>0</errorCode><errorDescription></errorDescription><lists><list><listID>1</listID><listName>News</listName></list></lists></GetListsResult>"