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 Feature] Contact.{tag,star,remark,find,findAll} #34

Closed
huan opened this issue Oct 2, 2016 · 1 comment
Closed

[New Feature] Contact.{tag,star,remark,find,findAll} #34

huan opened this issue Oct 2, 2016 · 1 comment
Assignees
Milestone

Comments

@huan
Copy link
Member

huan commented Oct 2, 2016

update 2016-10-17: there's no api for star/tag in web api. we can only do remark name by api.

according to #14

Contact : {
  remark() : string
  remark(string) : string
}

type TagInfo = { any: boolean }
tag() : string[]
tag(tags: TagInfo): string[]
star() : boolean
star(boolean) : boolean
static findByTag(tags: TagInfo)
static findByStar()

Tag / Star / Remark Contact

const contact = Contact.load(message.get('from'))
contact.remark('Remark Memo Name')

contact.tag({tag1: true})
contact.tag({tag1: false})
contact.tag() : string[]
contact.star(true)
contact.star(false)
contact.star() : boolean

Find Contact

const contact = Contact.findByTag({tag1: true})
const starContacts = Contact.findByStar()

@huan huan added this to the v0.4 milestone Oct 2, 2016
@huan huan self-assigned this Oct 2, 2016
huan added a commit that referenced this issue Oct 5, 2016
@huan huan modified the milestones: v0.5, v0.4 Oct 9, 2016
huan added a commit that referenced this issue Oct 23, 2016
huan added a commit that referenced this issue Oct 31, 2016
@huan
Copy link
Member Author

huan commented Nov 2, 2016

contact.remark('new memo name') should work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant