Code Monkey home page Code Monkey logo

Comments (3)

gmarciano avatar gmarciano commented on May 29, 2024

Actually, what do you think about adding a pure gmail query function?


Like:

public function raw($query)
{
    $this->add($query);

    return $this;
}

And the usage would be like:

LaravelGmail::message()->raw('after:2018-12-30 from:[email protected] subject:LaravelGmail');

I guess you had already thought about doing something like that and it didn't work, that's why I ask. But anyway, hope you like the idea! 😄

from laravel-gmail.

gmarciano avatar gmarciano commented on May 29, 2024

See if you think these are relevantes changes

/**
 * Filter to get only emails after a specific date
 *
 * @param $date
 *
 * @return $this
 */
public function after( $date )
{
	$this->add( "after:{$date}" );

	return $this;
}

/**
 * Filter to get only emails before a specific date
 *
 * @param $date
 *
 * @return $this
 */
public function before( $date )
{
	$this->add( "before:{$date}" );

	return $this;
}

/**
 * Filter by a Gmail raw query
 * Label should be the last thing to put in the raw query
 * 
 * @param $query
 * 
 * @return $this
 */
public function raw($query)
{
	$this->add( $query );

	return $this;
}

from laravel-gmail.

dacastro4 avatar dacastro4 commented on May 29, 2024

@gmarciano amazing idea. Adding it now. (Sorry for the late response)

from laravel-gmail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.