You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting an error when querying properties of recently created lists: After I create a list, I then query for the list of lists (CreateSend::Client#lists) and the recently-created list is missing most of the time.
This rake task consistently exhibits the issue for me:
require 'createsend'
namespace :campaign_monitor do
task :demo do
auth = {api_key: API_KEY}
client_id = CreateSend::CreateSend.new(auth).clients.tap do |cs|
raise if cs.size != 1
end.first['ClientID']
client = CreateSend::Client.new(auth, client_id)
p [:available_lists, client.lists.map(&:Name)]
# (empty list to start)
20.times do |i|
puts "Creating list#{i}"
list_id = CreateSend::List.create(auth, client_id, "list#{i}", "https://localhost", false, "https://localhost")
sleep 10
p [:available_lists, client.lists.map(&:Name)]
# Even after 10 seconds, still missing....
puts
end
end
end
I can, however, grab the list ID that comes back from the CreateSend::List.create call, and use it to delete the list from the server (presumably I could do other things with it via the API).
This behavior definitely feels unintuitive, so some docs about what my expectations should be would be nice at least.
The text was updated successfully, but these errors were encountered:
I'm getting an error when querying properties of recently created lists: After I create a list, I then query for the list of lists (
CreateSend::Client#lists
) and the recently-created list is missing most of the time.This rake task consistently exhibits the issue for me:
Output:
I can, however, grab the list ID that comes back from the
CreateSend::List.create
call, and use it to delete the list from the server (presumably I could do other things with it via the API).This behavior definitely feels unintuitive, so some docs about what my expectations should be would be nice at least.
The text was updated successfully, but these errors were encountered: