Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Methods for Integration Tools #7

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
181e629
Primer commit, se trabajara implementando campañas qun no implementado
Oct 5, 2016
f0c7045
Se impelemtan los metodos de consulta para campañas.
Oct 5, 2016
a24d259
Se impelemtan los metodos de consulta para reportes de las campañas y…
Oct 6, 2016
a50ce33
Se impelemtan los metodos de consulta para reportes de las campañas y…
Oct 6, 2016
91ce006
I moved report folder out of campaign folder, I created a enum for ty…
Oct 15, 2016
9d6e97c
Added processing response isn't JSON
aqman1 Dec 1, 2016
c159b1c
Update publish.gradle
aqman1 Dec 1, 2016
f5747a8
Merge pull request #8 from aqman1/master
Dec 2, 2016
5dfe3dd
version updated
Dec 2, 2016
e7bbf49
Some bugs were solved.
Dec 6, 2016
7911d6e
Some bugs were solved.
Dec 18, 2016
c5be5b9
I added _link attribute in the parent class for all classes. And adde…
Dec 18, 2016
b7de3bc
I added a new enum class for the campings type
Dec 18, 2016
be94f38
Segment modules was Implemented.
Dec 19, 2016
4bfb690
Segment modules was Implemented #2
Dec 19, 2016
9a412f0
location of segments were changed
Jan 11, 2017
2fe9b4b
Campaign operations (list, create, edit, delete, actions) added
REDGML Jan 20, 2017
b5d637f
Campaign content operations (get, set) added
REDGML Jan 20, 2017
7a18942
Create new list method added
REDGML Jan 20, 2017
f8fab25
MergeField operations (get all, create, update) added
REDGML Jan 20, 2017
28af9a1
GetEmailActivitysMethod added
REDGML Jan 23, 2017
769ab6c
GetUnsubscribedMethod added
REDGML Jan 23, 2017
f393c9c
DeleteListMethod added
REDGML Jan 24, 2017
24cb92d
Added missing body params to Schedule CampaignActionMethod
REDGML Jan 26, 2017
9bd83e2
Merge pull request #12 from red61/marketing_backend
Mar 12, 2017
15fa34b
version updated
Mar 12, 2017
2cd7161
Fix link in documentation (#14)
Apr 3, 2017
9f7e202
a several changes
May 7, 2017
87faafc
automation
May 17, 2017
5b22bdc
Merge branch 'master' of https://github.com/lararojasmr/maleorang
lararojasmr May 18, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'signing'

group = 'com.ecwid'
archivesBaseName = "maleorang"
version = '3.0-0.9.4'
version = '3.0-0.9.5'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the version change. I will update the version number myself when release a new version

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready!


task javadocJar(type: Jar) {
classifier = 'javadoc'
Expand Down Expand Up @@ -64,6 +64,11 @@ if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePass
name 'Vasily Karyaev'
email '[email protected]'
}
developer {
id 'lararojasmr'
name 'Manuel Lara'
email '[email protected]'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package com.ecwid.maleorang.method.v3_0.campaign

import com.ecwid.maleorang.MailchimpObject
import com.ecwid.maleorang.annotation.Field
import java.util.*

/**
* Created by: Manuel Lara <[email protected]>
*/

class CampaignInfo : MailchimpObject() {
@JvmField
@Field
var id: String? = null

@JvmField
@Field
var type: String? = null
Copy link
Contributor

@apocheau apocheau Oct 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can use an Enum for field "type":
From the doc: Possible Values: regular, plaintext, absplit, rss, variate


@JvmField
@Field
var create_time: String? = null

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field should be of type Date

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready my friend!


@JvmField
@Field
var archive_url: String? = null

@JvmField
@Field
var long_archive_url: String? = null

@JvmField
@Field
var status: String? = null

@JvmField
@Field
var emails_sent: Int? = null

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add TODOs for fields that are not yet included. It will be easier to track them and add them afterwords.
For example: //TODO: Add send_time field

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added my friend

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ready

@JvmField
@Field
var content_type: String? = null

@JvmField
@Field
var recipients: RecipientsCampaignInfo? = null

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO settings
TODO variate_settings
TODO tracking
TODO rss_opts
TODO ab_split_opts
TODO social_card
TODO report_summary
TODO delivery_status

Copy link
Contributor

@apocheau apocheau Oct 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_links field has already been created in my last pull request.
We will need to move it to src/main/java/com/ecwid/maleorang/method/v3_0/ and then use it globally.
You can add a TODO also for this field.

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.ecwid.maleorang.method.v3_0.campaign


import com.ecwid.maleorang.MailchimpMethod
import com.ecwid.maleorang.annotation.*
import org.apache.commons.codec.digest.DigestUtils

/**
* Created by: Manuel Lara <[email protected]>
*/

@Method(httpMethod = HttpMethod.GET, version = APIVersion.v3_0, path = "/campaigns/{campaign_id}")
class GetCampaignMethod(
@JvmField
@PathParam
val campaign_id: String
) : MailchimpMethod<CampaignInfo>() {

@JvmField
@QueryStringParam
var fields: String? = null

@JvmField
@QueryStringParam
var exclude_fields: String? = null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package com.ecwid.maleorang.method.v3_0.campaign


import com.ecwid.maleorang.MailchimpMethod
import com.ecwid.maleorang.MailchimpObject
import com.ecwid.maleorang.annotation.*
import java.util.*

/**
* Created by: Manuel Lara <[email protected]>
*/

@Method(httpMethod = HttpMethod.GET, version = APIVersion.v3_0, path = "/campaigns")
class GetCampaignsMethod : MailchimpMethod<GetCampaignsMethod.Response>() {

@JvmField
@QueryStringParam
var fields: String? = null

@JvmField
@QueryStringParam
var exclude_fields: String? = null

@JvmField
@QueryStringParam
var count: Int? = null

@JvmField
@QueryStringParam
var offset: Int? = null

@JvmField
@QueryStringParam
var type: String? = null

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we added a enum for types, shouldn't this be a TypeCampaign?


@JvmField
@QueryStringParam
var status: String? = null

@JvmField
@QueryStringParam
var before_send_time: String? = null

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field should be of type Date

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, you got right! i changed that.


@JvmField
@QueryStringParam
var since_send_opt: String? = null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field name is since_send_time not since_send_opt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field should be of type Date

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ready

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a Date field


@JvmField
@QueryStringParam
var before_create_time: String? = null

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field should be of type Date

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ready


@JvmField
@QueryStringParam
var since_create_time: String? = null

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field should be of type Date

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ready


@JvmField
@QueryStringParam
var list_id: String? = null

@JvmField
@QueryStringParam
var folder_id: String? = null

class Response : MailchimpObject() {
@JvmField
@Field
var campaings: List<CampaignInfo>? = null

@JvmField
@Field
var total_items: Int? = null
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO _links

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will add this in the super class.

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.ecwid.maleorang.method.v3_0.campaign

import com.ecwid.maleorang.MailchimpObject
import com.ecwid.maleorang.annotation.Field
import java.util.*

/**
* Created by: Manuel Lara <[email protected]>
*/

class RecipientsCampaignInfo : MailchimpObject() {
@JvmField
@Field
var list_id: String? = null

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO list_name
TODO segment_text
TODO recipient_count

@JvmField
@Field
var segment_opts: MailchimpObject? = null
Copy link
Contributor

@apocheau apocheau Oct 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO Create SegmentOpts Object


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.ecwid.maleorang.method.v3_0.reports

import com.ecwid.maleorang.MailchimpObject
import com.ecwid.maleorang.annotation.Field
import java.util.*

/**
* Created by: Manuel Lara <[email protected]>
*/

class CampaignBounceReport : MailchimpObject() {
@JvmField
@Field
var hard_bounces: Int? = null

@JvmField
@Field
var soft_bounces: Int? = null

@JvmField
@Field
var syntax_errors: Int? = null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.ecwid.maleorang.method.v3_0.reports

import com.ecwid.maleorang.MailchimpObject
import com.ecwid.maleorang.annotation.Field
import java.util.*

/**
* Created by: Manuel Lara <[email protected]>
*/

class CampaignClicksReport : MailchimpObject() {
@JvmField
@Field
var clicks_total: Int? = null

@JvmField
@Field
var unique_clicks: Int? = null

@JvmField
@Field
var unique_subscriber_clicks: Int? = null

@JvmField
@Field
var click_rate: Double? = null

@JvmField
@Field
var last_click: Date? = null

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.ecwid.maleorang.method.v3_0.reports

import com.ecwid.maleorang.MailchimpObject
import com.ecwid.maleorang.annotation.Field
import java.util.*

/**
* Created by: Manuel Lara <[email protected]>
*/

class CampaignDeliveryStatusReport : MailchimpObject() {
@JvmField
@Field
var enabled: Boolean? = null

@JvmField
@Field
var can_cancel: Boolean? = null

@JvmField
@Field
var status: String? = null

@JvmField
@Field
var emails_sent: Int? = null

@JvmField
@Field
var emails_canceled: Int? = null

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.ecwid.maleorang.method.v3_0.reports

import com.ecwid.maleorang.MailchimpObject
import com.ecwid.maleorang.annotation.Field
import java.util.*

/**
* Created by: Manuel Lara <[email protected]>
*/

class CampaignEcommerceReport : MailchimpObject() {
@JvmField
@Field
var total_orders: Int? = null

@JvmField
@Field
var total_spent: Double? = null

@JvmField
@Field
var total_revenue: Double? = null

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.ecwid.maleorang.method.v3_0.reports

import com.ecwid.maleorang.MailchimpObject
import com.ecwid.maleorang.annotation.Field
import java.util.*

/**
* Created by: Manuel Lara <[email protected]>
*/

class CampaignFacebookLikesReport : MailchimpObject() {
@JvmField
@Field
var recipient_likes: Int? = null

@JvmField
@Field
var unique_likes: Int? = null

@JvmField
@Field
var facebook_likes: Int? = null

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.ecwid.maleorang.method.v3_0.reports

import com.ecwid.maleorang.MailchimpObject
import com.ecwid.maleorang.annotation.Field
import java.util.*

/**
* Created by: Manuel Lara <[email protected]>
*/

class CampaignForwardsReport : MailchimpObject() {
@JvmField
@Field
var forwards_count: Int? = null

@JvmField
@Field
var forwards_opens: Int? = null

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package com.ecwid.maleorang.method.v3_0.reports

import com.ecwid.maleorang.MailchimpObject
import com.ecwid.maleorang.annotation.Field
import java.util.*

/**
* Created by: Manuel Lara <[email protected]>
*/

class CampaignIndustryStatsReport : MailchimpObject() {

@JvmField
@Field
var type: String? = null

@JvmField
@Field
var open_rate: Double? = null

@JvmField
@Field
var click_rate: Double? = null

@JvmField
@Field
var bounce_rate: Double? = null

@JvmField
@Field
var unopen_rate: Double? = null

@JvmField
@Field
var unsub_rate: Double? = null

@JvmField
@Field
var abuse_rate: Double? = null

}
Loading